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

    • Bug
    • Resolution: Done
    • Major
    • JBossAS-4.2.3.GA
    • JBossAS-4.2.2.GA
    • EJB2
    • None

    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.

      Attachments

        Activity

          People

            adrian.brock Adrian Brock (Inactive)
            dciarnie_jira Dan Ciarniello (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: