How to ? - Calling a JMX client from AS 7.1 deployment?
paulmkeogh Apr 16, 2012 3:20 PMHi,
I have a relatively simple use case but I'm getting nowhere.
I have a deployment that contains a POJO that invokes a remote JMX command. The command is of the form;
service:jmx:iiop://localhost:7001/jndi/weblogic.management.mbeanservers.runtime
Its WebLogic 9.2.
The POJO works fine when I link against the WL 9.x client libraries and run under JUnit.
When I use Arquillian to deploy the POJO in WAR towards 7.1, it fails with;
Caused by: java.lang.ClassNotFoundException: com.sun.corba.se.impl.orb.ORBImpl from [Module "deployment.test.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.1.1.GA]
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:316) [rt.jar:1.6.0_17]
at java.lang.Class.forName0(Native Method) [rt.jar:1.6.0_17]
at java.lang.Class.forName(Class.java:247) [rt.jar:1.6.0_17]
at org.omg.CORBA.ORB.create_impl(ORB.java:295) [jacorb-2.3.1.jbossorg-1.jar:]
I am running with standalone-full.xml config.
I find the missing class in rt.jar and add it to the Shrinkwrap archive that Arquillian deploys. I get a bit further;
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_17] | |
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_17] | |
at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_17] |
Caused by: java.lang.ClassCastException: com.sun.corba.se.impl.orb.ORBImpl cannot be cast to org.omg.CORBA.ORB
at org.omg.CORBA.ORB.create_impl(ORB.java:295) [jacorb-2.3.1.jbossorg-1.jar:] |
But I really think I'm on the wrong path here - any suggestions ?
Thanks,