• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

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

 
Ranch Hand
Posts: 216
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?

 
ernest fakudze
Ranch Hand
Posts: 216
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!