How to execute CREATE twiddle command using TWIDDLE STANDALONE in Wildfly-8.2.0-Final.
sridharthiyagarajan Oct 8, 2015 7:14 AMHello,
I used Twiddle Standalone (https://github.com/swesource/twiddle-standalone) as twiddle feature is not available in Wildfly 8.2.0-Final.
When I executed the twiddle command for START, STOP, DESTROY lifecycle methods of MBeans, it worked fine and below are the commands used.
START - ./twiddle.sh -s service:jmx:http-remoting-jmx://localhost:9990 invoke test.mbeans:service=Importer start
STOP - ./twiddle.sh -s service:jmx:http-remoting-jmx://localhost:9990 invoke test.mbeans:service=Importer stop
DESTROY - ./twiddle.sh -s service:jmx:http-remoting-jmx://localhost:9990 invoke test.mbeans:service=Importer destroy
After executing DESTROY, I am trying to CREATE the MBean using twiddle but getting the below exception related to classloader.
CREATE - ./twiddle.sh -s service:jmx:http-remoting-jmx://localhost:9990 create com.it.test.jmx.Importer test.mbeans:service=Importer
16:22:44,783 INFO [xnio] XNIO version 3.3.0.Final
16:22:44,860 INFO [nio] XNIO NIO Implementation Version 3.3.0.Final
16:22:44,906 INFO [remoting] JBoss Remoting version 4.0.6.Final
16:22:45,321 ERROR [Twiddle] Exec failed
javax.management.ReflectionException: The MBean class could not be loaded by the default loader repository
at com.sun.jmx.mbeanserver.MBeanInstantiator.findClassWithDefaultLoaderRepository(MBeanInstantiator.java:104)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.createMBean(DefaultMBeanServerInterceptor.java:268)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.createMBean(DefaultMBeanServerInterceptor.java:206)
at com.sun.jmx.mbeanserver.JmxMBeanServer.createMBean(JmxMBeanServer.java:326)
at org.jboss.as.jmx.PluggableMBeanServerImpl$TcclMBeanServer.createMBean(PluggableMBeanServerImpl.java:1364)
at org.jboss.as.jmx.PluggableMBeanServerImpl.createMBean(PluggableMBeanServerImpl.java:295)
at org.jboss.as.jmx.BlockingNotificationMBeanServer.createMBean(BlockingNotificationMBeanServer.java:93)
at org.jboss.remotingjmx.protocol.v2.ServerProxy$CreateMBeanHandler.handle(ServerProxy.java:524)
at org.jboss.remotingjmx.protocol.v2.ServerCommon$MessageReciever$1$1.run(ServerCommon.java:153)
at org.jboss.as.jmx.ServerInterceptorFactory$Interceptor$1.run(ServerInterceptorFactory.java:75)
at org.jboss.as.jmx.ServerInterceptorFactory$Interceptor$1.run(ServerInterceptorFactory.java:70)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:422)
at org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:94)
at org.jboss.as.jmx.ServerInterceptorFactory$Interceptor.handleEvent(ServerInterceptorFactory.java:70)
at org.jboss.remotingjmx.protocol.v2.ServerCommon$MessageReciever$1.run(ServerCommon.java:149)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: com.it.test.jmx.Importer
at com.sun.jmx.mbeanserver.ClassLoaderRepositorySupport.loadClass(ClassLoaderRepositorySupport.java:232)
at com.sun.jmx.mbeanserver.ClassLoaderRepositorySupport.loadClass(ClassLoaderRepositorySupport.java:144)
at com.sun.jmx.mbeanserver.MBeanInstantiator.findClassWithDefaultLoaderRepository(MBeanInstantiator.java:101)
... 18 more
There is an option to send class loader as one of the parameter in the command but I am not aware of the value to be sent. Has anyone faced this issue ? Please help.