[ 
https://issues.apache.org/jira/browse/XERCESJ-1466?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12907664#action_12907664
 ] 

Michael Glavassevich commented on XERCESJ-1466:
-----------------------------------------------

The endorsed mechanism was designed for overriding *APIs*, classes which have 
the same name as those already in the JDK.  Oracle/Sun renames Xerces when they 
bundle it in their JDK so you've never had to include xercesImpl.jar in the 
endorsed directory and only need to put xml-apis.jar in the endorsed dir when 
you want to upgrade the JAXP API level which is already at 1.4 in Java 6. The 
Tomcat how-to on this subject is misleading / incorrect.

> ElementTraversal interface not found
> ------------------------------------
>
>                 Key: XERCESJ-1466
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1466
>             Project: Xerces2-J
>          Issue Type: Bug
>    Affects Versions: 2.10.0
>         Environment: java version "1.6.0_20"
> Java(TM) SE Runtime Environment (build 1.6.0_20-b02-279-10M3065)
> Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01-279, mixed mode)
>            Reporter: Thomas Krammer
>
> When I replace the JDK's default parser with Xerces 2.10.0 by adding the 
> xercesImpl.jar to a directory in the java.endorsed.dirs loading the parser 
> fails with
> java.lang.NoClassDefFoundError: org/w3c/dom/ElementTraversal
>       at org.apache.xerces.dom.CoreDocumentImpl.createElementNS(Unknown 
> Source)
>       at 
> org.apache.xerces.dom.CoreDOMImplementationImpl.createDocument(Unknown Source)
> ...
> I can fix this by also adding the xml-apis.jar into a endorsed directory. But 
> this in turn breaks XPath with the exception mentioned in 
> http://www.mail-archive.com/[email protected]/msg01327.html
> That happens because the XPathFactoryFinder included in Xerces uses a 
> different default XPathFactory ("org.apache.xpath.jaxp.XPathFactoryImpl") 
> than the one included in the JDK 
> ("com.sun.org.apache.xpath.internal.jaxp.XPathFactoryImpl").
> I recommend adding the ElementTraversal interface to xercesImpl. Then the jar 
> would be a drop-in replacement for the existing JDK parser.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to