Roger Holbrook
2002-01-23 18:00:02 UTC
I am now trying to run the RI ModelMBean example on OpenJMX
There are several problems that are obviously linked to the coding of
the example itself - but then there appears to be a more significant
issue when trying to invoke a method of class DynamicMBean or ModelMBean,
on an instance of RequiredModelMBean, that has been successfully
registered with the mbean server.
For example, when mbeanObjectName referred to a successfully registered instance,
the following call:
server.invoke(mbeanObjectName,
"javax.management.modelmbean.RequiredModelMBean.setManagedResource",
new Object[] { new TestBean(), "ObjectReference"},
new String[]{"java.lang.Object", "java.lang.String"});
generated the following stack trace:
javax.management.MBeanException: nested exception is
javax.management.ServiceNotFoundException:
Cannot find ModelMBeanOperationInfo for operation
javax.management.modelmbean.RequiredModelMBean.setManagedResource
at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:550)
at openjmx.MBeanIntrospector.invoke(MBeanIntrospector.java:204)
at openjmx.MBeanServerImpl.invoke(MBeanServerImpl.java:158)
at ModelAgent.createMBean(ModelAgent.java:236)
at ModelAgent.doSimpleDemo(ModelAgent.java:146)
at ModelAgent.main(ModelAgent.java:96)
Trying to invoke any of the other DynamicMBean or ModelMBean methods seems to produce
similar results...
Roger
There are several problems that are obviously linked to the coding of
the example itself - but then there appears to be a more significant
issue when trying to invoke a method of class DynamicMBean or ModelMBean,
on an instance of RequiredModelMBean, that has been successfully
registered with the mbean server.
For example, when mbeanObjectName referred to a successfully registered instance,
the following call:
server.invoke(mbeanObjectName,
"javax.management.modelmbean.RequiredModelMBean.setManagedResource",
new Object[] { new TestBean(), "ObjectReference"},
new String[]{"java.lang.Object", "java.lang.String"});
generated the following stack trace:
javax.management.MBeanException: nested exception is
javax.management.ServiceNotFoundException:
Cannot find ModelMBeanOperationInfo for operation
javax.management.modelmbean.RequiredModelMBean.setManagedResource
at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:550)
at openjmx.MBeanIntrospector.invoke(MBeanIntrospector.java:204)
at openjmx.MBeanServerImpl.invoke(MBeanServerImpl.java:158)
at ModelAgent.createMBean(ModelAgent.java:236)
at ModelAgent.doSimpleDemo(ModelAgent.java:146)
at ModelAgent.main(ModelAgent.java:96)
Trying to invoke any of the other DynamicMBean or ModelMBean methods seems to produce
similar results...
Roger