I have 2 war files which use Spring web services. When I deploy them into Tomcat 5.5 they work fine. However, in Glassfish one of them fails to work. I get the stack trace below. Some discussions on this problem seem to suggest that the xalan classes are interfering with each other but I have not been able to fix it. Any thoughts?
In a time of drastic change it is the learners who inherit the future. The learned usually find themselves equipped to live in a world that no longer exists.<br />Eric Hoffer
Joined: Aug 27, 2001
I have sorted the problem out. This is what was happening: Glassfish has a jar called "webservices-rt.jar" and it contains some of the SOAP stuff. Furthermore, it loads this jar first which means that any subsequest classes that need the classes found in "webservices-rt.jar" then use the already loaded jar classes. In my apps I have "saaj-api-1.3.jar" and "saaj-impl-1.3.jar". I traced the classloader issue by enabling the JVM option -verbose:class and when I made a webservice request in my app I saw something like
I then appended my jars to the server Pre classpath and it now works. So as you can see I've been to Jar Hell and back ;) Happy coding!!
subject: java.io.IOException: org.apache.xml.serializer.ToXMLSAXHandler when deploying into Glassfish 2.1