JMX Remote

I'm trying to compile and test the tuturiol found here: http://java.sun.com/j2se/1.5.0/docs/guide/jmx/tutorial/connectors.html#wp997327

however, when I try and run the Server.java class I get this:

>>> Create the SimpleStandard MBean within the MBeanServer

ObjectName = DefaultDomain:type=SimpleStandard,index=1

!!! Could not create the SimpleStandard MBean !!!

javax.management.ReflectionException: The MBean class could not be loaded by the default loader repository

at com.sun.jmx.mbeanserver.MBeanInstantiatorImpl.findClassWithDefaultLoaderRepository(MBeanInstantiatorImpl.java:61)

at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.createMBean(DefaultMBeanServerInterceptor.java:271)

at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.createMBean(DefaultMBeanServerInterceptor.java:211)

at com.sun.jmx.mbeanserver.JmxMBeanServer.createMBean(JmxMBeanServer.java:301)

at com.brianspindler.jmx.Server.createSimpleMBean(Server.java:57)

at com.brianspindler.jmx.Server.main(Server.java:32)

Caused by: java.lang.ClassNotFoundException: SimpleStandard

at com.sun.jmx.mbeanserver.ClassLoaderRepositorySupport.loadClass(ClassLoaderRepositorySupport.java:208)

at com.sun.jmx.mbeanserver.ClassLoaderRepositorySupport.loadClass(ClassLoaderRepositorySupport.java:128)

at com.sun.jmx.mbeanserver.MBeanInstantiatorImpl.findClassWithDefaultLoaderRepository(MBeanInstantiatorImpl.java:58)

... 5 more

EXITING...

Any help is greatly appreciated!

Message was edited by:

bspindler

[1614 byte] By [bspindlera] at [2007-11-26 18:51:37]
# 1

Having a quick look at your stack trace it seems you have put all the

example's classes under the java package "com.brianspindler.jmx".

If this is the case then you should modify the code in Server.java

accordingly to reflect these changes, i.e. in the create MBean calls

replace "SimpleStandard" by "com.brianspindler.jmx.SimpleStandard".

Regards,

Luis

lmalventa at 2007-7-9 6:25:43 > top of Java-index,Core,Monitoring & Management...
# 2
Thanks Luis, that did it!
bspindlera at 2007-7-9 6:25:43 > top of Java-index,Core,Monitoring & Management...