Unable to use io.fabric8:type=Fabric MBean via io.fabric8.api.jmx.FabricManagerMBean.

Solution Verified - Updated -

Issue

  • I'm using io.fabric8:type=Fabric MBean via io.fabric8.api.jmx.FabricManagerMBean. In JBoss Fuse 6.1.1 it works fine, but in the version 6.2.0 when I try to connect at the Mbean i have this stacktrace:-
java.lang.NoClassDefFoundError: javax.management.NotificationListener not found by io.fabric8.fabric-api
  • Is there any changes in the management of Mbean in JBoss Fuse 6.2.0?
  • When using io.fabric8:type=Fabric MBean, like below sample.
FabricManagerMBean mBeanProxy = null;
        try {
            MBeanServerConnection connection = connector.getMBeanServerConnection();
            ObjectName fabricObjectName = new ObjectName("io.fabric8:type=Fabric");
            mBeanProxy = JMX.newMBeanProxy(connection, fabricObjectName,FabricManagerMBean.class, true);
        } catch (Exception ex) {
            ex.printStackTrace();
          }
  • Deploying the above sample code as a bundle on Jboss Fuse 6.2 gives the below error in the log.
java.lang.NoClassDefFoundError: javax.management.NotificationListener not found by io.fabric8.fabric-api [76]
    at com.sun.proxy.$Proxy48.<clinit>(Unknown Source)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at java.lang.reflect.Proxy.newInstance(Proxy.java:764)
    at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:755)
    at javax.management.JMX.createProxy(JMX.java:416)
    at javax.management.JMX.newMBeanProxy(JMX.java:208)

Environment

  • Red Hat JBoss Fuse
    • 6.2.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content