- This topic has 3 replies, 2 voices, and was last updated 17 years, 5 months ago by Riyad Kalla.
-
AuthorPosts
-
GGJParticipantI’m updating my web application to use a newer version of a third party jar. The third party jar needs a modified version of axis.jar which they have supplied. If I run a simple java main program to test the code everything works fine.
When I run the same code from my web application I get a NoClassDefFoundError.
java.lang.NoClassDefFoundError: org/apache/axis/transport/http/HTTPSender
I have verified that the modified version of axis.jar has the class HTTPSender and is in my /lib directory. I assume JBoss has picked up the axis.jar version that comes with JBoss. How can I tell the classloader to load the modified version of axis.jar in my /lib directory?
Using: JBoss 3.2.3
Any workarounds? Thanks, Glenn
Riyad KallaMemberGlenn,
When you say your /lib dir, you mean the one under WebRoot/WEB-INF/lib right? Also are you going out to the deployed application’s location and making sure that the axis JAR is in the deployed folder and getting there correctly?
GGJParticipant@support-rkalla wrote:
Glenn,
When you say your /lib dir, you mean the one under WebRoot/WEB-INF/lib right? Also are you going out to the deployed application’s location and making sure that the axis JAR is in the deployed folder and getting there correctly?Yes “/WebRoot/WEB-INF/lib” directory. Yes I verified its location in the deployed folder too.
From what I’ve read on the net sounds like the JBoss default classloader is to load each reference once. So if JBoss startup references Axis.jar first, then that is the version that is loaded and my web app Axis.jar version is not.
What’s the best way to override this behavior?
Thanks, Glenn
Riyad KallaMemberGlenn there is a way to work around this by specifying each web project use it’s own class loader… docs here:
http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossClassLoadingUseCasestry scrolling to the bottom. I think you need a jboss-web.xml file with some config in it specifying that, like useJBossClassLoader=true, but I don’t know the format of the file.
-
AuthorPosts