Help coderanch get a
new server
by contributing to the fundraiser
  • 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

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

 
Ranch Hand
Posts: 216
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!!
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic