-
1. Re: ClassLoader problem with a rar inside an ear
janaudy Sep 26, 2004 8:45 AM (in response to imcshane)>> P.S. the same ear works ok in websphere and weblogic. Do jboss classloaders work differently ?
Yes, jBoss ClassLoaders are "different". They have a concept of UnifiedClassLoader that does not exist on Weblogic AFAIK.
Read this: http://www.jboss.org/wiki/Wiki.jsp?page=ClassLoadingConfiguration -
2. Re: ClassLoader problem with a rar inside an ear
imcshane Sep 27, 2004 4:33 AM (in response to imcshane)Thanks for the reply. If my understanding is correct the wiki is basically stating a jar only needs defined once within an ear file unless there are different version dependencies and it will be loaded into the UnifiedClassLoader. This is the situation with my current app.
From this console output ...com.aepona.causeway.pcp.aepx.resource.common.SessionImpl Information
Not loaded in repository cache
### Instance0 found in UCL: org.jboss.mx.loading.UnifiedClassLoader3@44b7f7{ url=file:/tmp/jboss-3.2.5/server/causeway/tmp/deploy/tmp57045aepx-1.0.ear ,addedOrder=35}
my class is available to the UCL. I've turned class loader debug on and I can see the jar being added. The console output is as follows:
09:01:18,004 DEBUG [RARDeployer] Attempting to deploy RAR at 'file:/tmp/jboss-3.2.5/server/causeway/tmp/deploy/tmp64711aepx-1.0.ear-contents/connector-1.0.rar'
09:01:18,006 DEBUG [RARDeployment] Creating jboss.jca:service=ManagedConnectionFactory,name=connectors/X
09:01:18,007 DEBUG [JBossManagedConnectionPool] Creating jboss.jca:service=ManagedConnectionPool,name=connectors/X
09:01:18,008 DEBUG [NoTxConnectionManager] Creating jboss.jca:service=NoTxCM,name=connectors/X
09:01:18,009 DEBUG [MainDeployer] Done with create step of deploying connector-1.0.rar
and slightly later in the trace
09:01:20,257 DEBUG [MainDeployer] Begin deployment start file:/tmp/jboss-3.2.5/server/causeway/tmp/deploy/tmp64711aepx-1.0.ear-contents/connector-1.0.rar
09:01:20,264 DEBUG [MainDeployer] Begin deployment start file:/tmp/jboss-3.2.5/server/causeway/tmp/deploy/tmp64711aepx-1.0.ear-contents/connector-1.0.rar-contents/connector-1.0.jar
09:01:20,265 DEBUG [MainDeployer] End deployment start on package: connector-1.0.jar
I can't see any deployment errors in the log files or console trace.
So as far as I can tell my class is available in the class loader and there's only one version of it so there should be no conflicts. JBoss won't load it however.
I've tried various configurations of manifest files, tried moving the connector.jar out into the ear and other options to get this to run but they all throw the same error.
Are there any known issues accessing a rar deployed within an ear. I should have stated, I'm testing on jboss-3.2.5 on red-hat linux with jdk 1.4.2_01-b06.
Thanks,
Ivan -
3. Re: ClassLoader problem with a rar inside an ear
imcshane Sep 27, 2004 9:58 AM (in response to imcshane)Just to follow up on this in case anybody has a similar problem. I've got the ear running fine now.
The error was a bit of a red herring. The problem wasn't that the SessionImpl class wasn't being found but that a 3rd party dependency it relied on was missing so the class couldn't be loaded correctly.