-
1. Re: Jetty / Jboss class loader question
jules Nov 6, 2002 6:10 PM (in response to rmoore)It sounds very much as if, when loading classes, your common.jar is trying to load them with the wrong classloader.
The J2EE spec expects them to be loaded using Thread.currentThread().getContextClassLoader(). This will have been bound at the beginning of the request to the classloader which knows about your WEB-INF/lib,classes etc...
Instead your common.jar is most likely just using Class.forName() which will load into the classloader which loaded the common.jar.
This classloader will only be able to find it's own and it's parents classes - hence it cannot find any of those in your webapp.
If common.jar is yours, fix the classloading - you should use the Class.forName() which takes 3 params. The third being the target ClassLoader.
If common.jar is not yours, shout at the people who provided it to you and try copying it into each war. This may cause problems due to loading of multiple copies of the same class, but you may be OK - depends on many variables. Suck it and see
Jules -
2. Re: Jetty / Jboss class loader question
mschoning Nov 6, 2002 9:09 PM (in response to rmoore)I have had some classloader issues. This link helped me solve my problems
http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t=forums/ default behaviour of JBoss is to use one classloader repository that is common for all applications. So I think you will have to like me and define a repository for each application.