How to register Custom MBeans to Integration Server?

Hello All,

I was trying to create Custom MBean , register it in Integration Server and use JMX client to invoke its attributes.

But getting class not found exception while trying to register it. Let me know what i am missing here.
Code snippets below.

JMXServiceURL  url 
	        = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://host:post/jmxrmi");
		//  Get JMX connector
	    JMXConnector  jmxc = JMXConnectorFactory.connect(url, null);
	    //  Get MBean server connection
	    MBeanServerConnection  mbsc = jmxc.getMBeanServerConnection();

ObjectName object = new ObjectName("com.esb.monitoring.custom.mbean:type=Hello");

		mbsc.createMBean("HelloMBean", object);

Exception Traces :

Exception in thread "main" The MBean class could not be loaded by the default loader repository
	at com.sun.jmx.mbeanserver.MBeanInstantiator.findClassWithDefaultLoaderRepository(
	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.createMBean(
	at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.createMBean(

Caused by: java.lang.ClassNotFoundException: HelloMBean
	at com.sun.jmx.mbeanserver.ClassLoaderRepositorySupport.loadClass(


Were you able to register custom MBean?