javax.management.NotCompliantMBeanException: MBean class com.kooe.spidercom.factory.ControlCenter does not implement DynamicMBean, neither follows the Standard MBean conventions (javax.management.NotCompliantMBeanException: Class com.kooe.spidercom.factory.ControlCenter is not a JMX compliant Standard MBean) nor the MXBean conventions (javax.management.NotCompliantMBeanException: com.kooe.spidercom.factory.ControlCenter: Class com.kooe.spidercom.factory.ControlCenter is not a JMX compliant MXBean)
at com.sun.jmx.mbeanserver.Introspector.checkCompliance(Introspector.java:160)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.createMBean(DefaultMBeanServerInterceptor.java:287)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.createMBean(DefaultMBeanServerInterceptor.java:199)
at com.sun.jmx.mbeanserver.JmxMBeanServer.createMBean(JmxMBeanServer.java:286)
at com.kooe.spidercom.rmi.BDBServer.registMBean(BDBServer.java:31)
at com.kooe.spidercom.rmi.BDBServer.main(BDBServer.java:44)
原因
这是一个很低级的错误,
用来监控ControlCenter的标准MBean名称不对,正确的为:ControlCenterMBean
注:标准MBean名称必需是在要监控的类名后面加上“MBean”, 且要监控的类和MBean接口必需在同一包下,即MyBean的名字写错了