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

'Class does not expose a management interface:' class will allways be java.lang.Object

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Trivial Trivial
    • No Release
    • JBossAS-4.0.5.GA
    • JMX
    • 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"))

      { return new MBeanCapability(STANDARD_MBEAN); }

      }
      }

      throw new NotCompliantMBeanException("Class does not expose a management interface: " + mbeanClass.getName());

      Note that the proposed solution has NOT been tested.

              starksm64 Scott Stark (Inactive)
              hhallman Hugo Hallman (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: