aspose file tools*
The moose likes Other Java Products and Servers and the fly likes java.io.IOException: org.apache.xml.serializer.ToXMLSAXHandler when deploying into Glassfish 2.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "java.io.IOException: org.apache.xml.serializer.ToXMLSAXHandler when deploying into Glassfish 2.1" Watch "java.io.IOException: org.apache.xml.serializer.ToXMLSAXHandler when deploying into Glassfish 2.1" New topic
Author

java.io.IOException: org.apache.xml.serializer.ToXMLSAXHandler when deploying into Glassfish 2.1

ernest fakudze
Ranch Hand

Joined: Aug 27, 2001
Posts: 216
Hi folks,

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
ernest fakudze
Ranch Hand

Joined: Aug 27, 2001
Posts: 216
Hello,

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!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java.io.IOException: org.apache.xml.serializer.ToXMLSAXHandler when deploying into Glassfish 2.1