• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Getting JAXB to work in J2EE project

 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I managed to get JAXB to work as regular java application. However, I can't get it to work in my J2EE application.

I'm currently getting the following exception:-
java.lang.NoSuchMethodError: javax.xml.parsers.DocumentBuilderFactory.getSchema()Ljavax/xml/validation/Schema

By reading this site, http://forum.java.sun.com/thread.jspa?threadID=642441&messageID=3787464 , it seems like it is loading older Xerces.class, and omitting the newer class in jaxb jars sitting in my /WEB-INF/lib.

To get my java app to work, I have to invoke the java launcher with -Djava.endorsed.dirs= option, so that it picks up the new class.

But, how do I solve the class loader issue with a J2EE project?

I know I could solve this problem by switching to jdk 1.5, but my project is deployed in WAS 6 which uses jdk 1.4.

Any tips would be grateful here.

Thanks.
reply
    Bookmark Topic Watch Topic
  • New Topic