Menu

xercesImpl.jar hides org/w3c/dom classes

Help
jdv
2004-11-09
2013-02-27
  • jdv

    jdv - 2004-11-09

    When I add a JDO nature to a project, the inclusion of the xercesImpl.jar hides the existing package
    org.w3c.dom (from within rt.jar of Java 1.4.1) which I am using in a different but dependent Eclipse project.

    The error message is simply this:
    java.lang.NoClassDefFoundError: org/w3c/dom/ranges/DocumentRange

    I can see the org.w3c classes in xercesImpl.jar, but I'm not sure how to put them behind the regular Java classes. It seems odd that the xerxesImpl.jar classes could mask something in rt.jar

    Any ideas on how to structure my class path so that these two capabilities (the defalut XML parser in Java and the xercesImpl stuff in eclipseJDO) play nicely together?

    jdv

     
    • jdv

      jdv - 2004-11-19

      Here is an update to this issue:

      To reiterate and clarify: the problem was that in an Eclipse project dependent on another project which used eclipseJDO, the standard DOM parsing API was somehow gone or hidden.

      I never figured out exactly what was happening here - I think it had something to do with the EMF using a newer version of the DOM API, and therefore it was overriding the XML/DOM API inside Java (using the Endorsed Standards Override Mechanism).

      In any case, the problem went away when I added the xmlParserAPIs.jar (from a recent distribution of Xerces) to the classpath of the second project (not the one using eclipseJDO, but the one which depended on that project).

      -JDV

       

Log in to post a comment.