Notcompliantmbeanexception in JMX

Source: Internet
Author: User

The first example of learning about JMX encounters the above exception.

Javax.management.NotCompliantMBeanException:MBean class Com.acme.osb.CachesService does not implement Dynamicmbean, Neither follows the Standard MBean conventions (Javax.management.NotCompliantMBeanException:Class Com.acme.osb.CachesService is not a JMX compliant Standard MBean) nor the MXBean conventions (Javax.management.NotComplian TMBeanException:com.acme.osb.CachesService:Class Com.acme.osb.CachesService is not a JMX compliant MXBean)

The description of the exception is the same as this.

Because I'm writing a standard Mbean, follow the creation rules.

I built the HelloWorld this mbean, and this mbean is the interface that implements the Helloworldmbean. So conform to the specification.

And the real problem here is that the class and the interface aren't in the same package, so it goes wrong. Here's the answer I found

The Xxxmbean and the XXX class that implements the Xxxmbean should also is in the same.

That's the reason.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.