[
http://jira.jboss.com/jira/browse/JBAS-5475?page=all ]
Adrian Brock closed JBAS-5475.
------------------------------
Fix Version/s: JBossAS-4.2.3.GA
Resolution: Done
Assignee: Adrian Brock
Done, thanks.
NullPointerException when no invoker proxy bindings configured
--------------------------------------------------------------
Key: JBAS-5475
URL:
http://jira.jboss.com/jira/browse/JBAS-5475
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: EJB2
Affects Versions: JBossAS-4.2.2.GA
Environment: RHEL 4
JDK 1.6
Reporter: Dan Ciarniello
Assigned To: Adrian Brock
Fix For: JBossAS-4.2.3.GA
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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira