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.