Posted By:
Jason_Dillon
Posted On:
Monday, June 10, 2002 03:04 PM
Once again I am back to getting SwiftMQ to run as a service inside of JBoss. I have finished upgrading my app to JBoss 3.0 and have a new set of problems do deal with. I have written a SwiftMQRouterService, which is an JBoss Service MBean. It uses the SwiftletManager API to start the router via SwiftletManager.startRouter(configFilename). The problems that I am seeing with 3.0 are with the SwiftetManager not being able to see classes which are loaded from the JBoss UnifiedClassLoader (UCL) system: java.lang.NoClassDefFoundError: com/swiftmq/swiftlet/trace/TraceSwiftlet at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.j
More>>
Once again I am back to getting SwiftMQ to run as a service inside of JBoss. I have finished upgrading my app to JBoss 3.0 and have a new set of problems do deal with.
I have written a SwiftMQRouterService, which is an JBoss Service MBean. It uses the SwiftletManager API to start the router via SwiftletManager.startRouter(configFilename).
The problems that I am seeing with 3.0 are with the SwiftetManager not being able to see classes which are loaded from the JBoss UnifiedClassLoader (UCL) system:
java.lang.NoClassDefFoundError: com/swiftmq/swiftlet/trace/TraceSwiftlet
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at com.swiftmq.swiftlet.SwiftletManager.loadSwiftlet(SwiftletManager.java:653)
at com.swiftmq.swiftlet.SwiftletManager.startKernelSwiftlets(SwiftletManager.java:202)
at com.swiftmq.swiftlet.SwiftletManager.initSwiftlets(SwiftletManager.java:621)
at com.swiftmq.swiftlet.SwiftletManager.startRouter(SwiftletManager.java:422)
at com.boldfish.does.router.SwiftMQRouterService.startService(SwiftMQRouterService.java:160)
at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:162)
at java.lang.reflect.Method.invoke(Native Method)
... truncated ...
swiftmq.jar which contains TraceSwiftlet also contains SwiftetManager, which has definietly been loaded. Since there is no source available I can only guess that the problem is that SM is not using the TCL (Thread.getContextClassLoader()).
Note I am testing this with SwiftMQ 3.1.0, as I have not had time to update to 3.2.0 yet.
I would prefer to not put more classes on the system class path, as it makes it very hard to manage configurations and I have to put more than the SwiftMQ classes there, as it depends on other stuff like JSSE, which further muck up the config as I am then forced to move more and more to the system class path to avoid class loading issues.
Can you verify for me that the CL mechanism that SwiftletManager does not use TCL and if not can this be changed so that SwiftMQ can be run as a Service in JBoss with out having to hack up the class path for it?
Thanks,
--jason
<<Less