一个MBean异常NotCompliantMBeanException

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的名字写错了

转载于:https://www.cnblogs.com/esten/archive/2012/03/31/2427404.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值