[jboss-user] [Beginners Corner] - Re: Yet another isolated classloader question

PeterJ do-not-reply at jboss.com
Sat Sep 27 14:00:53 EDT 2008


Isolation, while handy, is not infallible. Let's say that class A uses class B which in turn uses class C. Classes A and C are in your isolated EAR. Classes B and C are in the lib directory. You now have a problem because the "C" you are using is from the lib directory, not the EAR. The solution to this situation is to also package B within the EAR. In many cases this is possible, in some cases it is not, especially if the standard Java EE libraries are involved.

One way to resolve such situations is to set the -verbose:class JVM command-line option. This option causes the classloaders to print out each class loaded and the JAR file the class came from. This might help solve the isolation issue.

As far as the Maven transitive dependencies go, I cannot think of any way around it that would not be more painful. 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4179200#4179200

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4179200



More information about the jboss-user mailing list