1 Reply Latest reply on Sep 12, 2007 12:31 PM by jgreif

    Change to newer JDK, MBean is not a NotificationBroadcaster

    jgreif

      After upgrading an existing application running in JBoss 4.0.5GA from Java 1.4.2 to Java 1.5.0_12, attempts to establish NotificationListeners on previously working MBeans now fail with the message "The speicfied MBean [com.webalo.am:typeName=UPS Dispatcher] is not a NotificationBroadcaster." The MBean in question extends NotificationBroadcasterSupport.

      In compiling and packaging the MBean, all old MX4J libraries have been moved out of the way. During JBoss startup, when the error occurs, tracing of classloading indicates that all the javax.management.** classes are loaded from the JRE's rt.jar as expected, and there appear to be no duplicates. The MBeanServer is loaded from jboss-jmx.jar and is the class org.jboss-mx.server.MBeanServerImpl.

      I do not see a setting of the javax.management.builder.initial system property in any configuration file.

      Any suggestions will be greatly appreciated.

      Jeff

        • 1. Re: Change to newer JDK, MBean is not a NotificationBroadcas
          jgreif

          This has been sorted out as an error in the application being upgraded.

          Apparently the earlier JMX libraries did not test (at least in the same way as the libraries shipped with JDK 1.5) whether the MBean to which a NotificationListener was being added was an implementation of NotificationBroadcaster. The test is done in the MBeanServer.isInstanceOf(), not by looking at the class of the MBean (which was appropriate in the app) but at the class name recorded in the MBeanInfo, which was incorrectly entered in this app and did not match the class of the MBean.

          Hope this info is of use to someone else.

          Jeff