-
1. Re: 3.2.0 Classloader issue
juhalindfors Apr 15, 2003 10:22 AM (in response to pants)can you deploy the X.jar just once by extracting it from the ears as its own unit (*.jar will get deployed from the deploy dir), and remove it from the ears.
-
2. Re: 3.2.0 Classloader issue
pants Apr 15, 2003 11:35 AM (in response to pants)OK, so I tried pulling out all the shared jars from the two ears, and just dropping them in the deploy directory and it sort of worked.
Problem is, I had to leave struts.jar, jstl.jar and the tlds in the WEB-INF/lib directory of a war in the A.ear.
It seems OK now, but presumably I will get the same "duplicate class found" if I deploy another ear with a war that needs struts or jstl.
Plus this kind of circumvents the whole idea of packaging required libraries inside ears.
Does this behaviour represent the new classloading semantics or is it a bug? -
3. Re: 3.2.0 Classloader issue
juhalindfors Apr 15, 2003 12:55 PM (in response to pants)I'm not sure why you're getting the LinkageError in the first case, was X.jar in WEB-INF/lib too?
In the second case I think it should be an option to fallback to serialization for calls between ears (even though it has a performance impact) and let the Java serialization worry about incompatibility between class definitions. Might be worth a RFE to see if there's any feedback to that.
If X.jar was under WEB-INF, can you try to share it at the EAR level (by adding module in your application.xml)? -
4. Re: 3.2.0 Classloader issue
h.buerger Apr 21, 2003 4:58 AM (in response to pants)There is a document describing the new class loader, ClassLoading.pdf on sourceforge.net (All files/Documentation).
I didn't fully read it yet but it it seems to answer your questions about class loading.
Regards
Haug -
5. Re: 3.2.0 Classloader issue
pants May 2, 2003 5:00 AM (in response to pants)After having read around and played around with various methods of packaging... the recommended way to package J2EE applications seems to deploy everything in a single ear.
i.e. "An EAR is a deployment contract. Each EAR should represent a complete application and should not rely on code external to the EAR file, except what is provided by the application server itself."