-
Bug
-
Resolution: Obsolete
-
Trivial
-
JBossAS-4.0.5.GA
-
None
-
Any
-
Low
The error message given when deploying a non-jmx bean will allways be:
"Class does not expose a management interface: java.lang.Object", and should instead obviously be mentioning the given implementation class. The problem is that when looping down the object hierarchy to find a JMX compatible class, the requested class is forgotten for the error message.
Proposed solution:
\jboss-4.0.4.GA-src.tar\jboss-4.0.4.GA-src\jmx\src\main\org\jboss\mx\metadata\MBeanCapability.java
(Problem remains in 4.0.5.GA: http://fisheye.jboss.com/browse/JBossAS/tags/JBoss_4_0_5_GA/jmx/src/main/org/jboss/mx/metadata/MBeanCapability.java?r=Branch_4_0)
// If the MyClass MBean is an instance of a MyClassMBean interface, MyClass is a standard MBean
for(Class current = mbeanClass; current != null; current = current.getSuperclass()) {
Class [] interfaces = current.getInterfaces();
for (int i = 0; i < interfaces.length; i++)
{
Class anInterface = interfaces[i];
if (anInterface.getName().equals(current.getName() + "MBean"))
}
}
throw new NotCompliantMBeanException("Class does not expose a management interface: " + mbeanClass.getName());
Note that the proposed solution has NOT been tested.