第一个简单的JMX例子报错 “javax.management.NotCompliantMBeanException”

 javax.management.NotCompliantMBeanException: MBean class com.jmx.demo.bean.Hello1 does not implement DynamicMBean, and neither follows the Standard MBean conventions (javax.management.NotCompliantMBeanException: Class com.jmx.demo.bean.Hello1 is not a JMX compliant Standard MBean) nor the MXBean conventions (javax.management.NotCompliantMBeanException: com.jmx.demo.bean.Hello1: Class com.jmx.demo.bean.Hello1 is not a JMX compliant MXBean)




原因:实现类的类名必须是 接口去掉MBean后的名字,且大小写敏感
例如:接口为  HelloMBean,则实现类类名为  Hello

你可能感兴趣的:(exception)