[jboss-jira] [JBoss JIRA] Created: (JBAS-3401) NPE in jdk5 javax.management.MBeanOperationInfo.equals() (affects jmx-console)

Dimitris Andreadis (JIRA) jira-events at jboss.com
Tue Jul 18 11:54:11 EDT 2006


NPE in jdk5 javax.management.MBeanOperationInfo.equals() (affects jmx-console)
------------------------------------------------------------------------------

                 Key: JBAS-3401
                 URL: http://jira.jboss.com/jira/browse/JBAS-3401
             Project: JBoss Application Server
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: Management services
            Reporter: Dimitris Andreadis
         Assigned To: Dimitris Andreadis
             Fix For: JBossAS-5.0.0.Beta


The  javax.management.MBeanOperationInfo.equals()  of jdk5 produces NPEs when any field of the "other" object is null: 

    public boolean equals(Object o) {
	if (o == this)
	    return true;
	if (!(o instanceof MBeanOperationInfo))
	    return false;
	MBeanOperationInfo p = (MBeanOperationInfo) o;
	return (p.getName().equals(getName()) &&
		p.getReturnType().equals(getReturnType()) &&
		p.getDescription().equals(getDescription()) &&
		p.getImpact() == getImpact() &&
		Arrays.equals(p.fastGetSignature(), fastGetSignature()));
    }

This could be a jdk bug, however the problem appears in when viewing the MainDeployer mbean through the jmx-console, due to the descriptor field of some "deploy" operation being null in the xmbean descriptor.

org.apache.jasper.JasperException: Exception in JSP: /inspectMBean.jsp:94

91:    {
92:       MBeanOperationInfo opInfo = operationInfo[a];
93:       System.out.println(String.valueOf(a) + opInfo);
94:       operationInfoIndexMap.put(opInfo, String.valueOf(a));
95:    }
96: 
97:    Arrays.sort(operationInfo, MBEAN_FEATURE_INFO_COMPARATOR);

root cause 

java.lang.NullPointerException
	javax.management.MBeanOperationInfo.equals(MBeanOperationInfo.java:209)
	java.util.HashMap.eq(HashMap.java:277)
	java.util.HashMap.put(HashMap.java:386)
	org.apache.jsp.inspectMBean_jsp._jspService(inspectMBean_jsp.java:155)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)

The problem doesn't affect Branch_4_0, since the inspectMBean.jsp code is different

-- 
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

        



More information about the jboss-jira mailing list