Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-5475

NullPointerException when no invoker proxy bindings configured

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: JBossAS-4.2.2.GA
    • Fix Version/s: JBossAS-4.2.3.GA
    • Component/s: EJB2
    • Labels:
      None
    • Environment:

      RHEL 4
      JDK 1.6

      Description

      When no invoker proxy bindings are configured, org.jboss.metadata.BeanMetaData.getInvokerBindings() returns a NullPointerException. This is caused by the fix for JBAS-4444. org.jboss.metadata.ConfigurationMetaData.getInvokers() used to return a zero-length array when no bindings were configured but it now returns a null value which BeanMetaData.getInvokerBindings() does not properly handle:

      public Iterator getInvokerBindings()
      {
      if (invokerBindings == null)
      {
      // See if there is a container default invoker name
      String[] defaultNames = configuration.getInvokers();
      if (defaultNames.length > 0) // Line 263 NPE
      {
      invokerBindings = new HashMap();
      for (int count = 0; count < defaultNames.length; count++)

      { invokerBindings.put(defaultNames[count], getJndiName()); }

      }
      else

      { // Use the hard-coded defaults defaultInvokerBindings(); }

      }

      return invokerBindings.keySet().iterator();
      }

      Changing line 263 to if(defaultNames!=null && defaultNames.length()>0) would eliminate the NPE.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                adrian.brock Adrian Brock
                Reporter:
                dciarnie Dan Ciarniello
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: