You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "Thomas Krammer (JIRA)" <xe...@xml.apache.org> on 2010/09/09 16:58:33 UTC

[jira] Created: (XERCESJ-1466) ElementTraversal interface not found

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/j-users@xerces.apache.org/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: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org


[jira] Closed: (XERCESJ-1466) ElementTraversal interface not found

Posted by "Thomas Krammer (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESJ-1466?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Krammer closed XERCESJ-1466.
-----------------------------------


I see. I expected I have to add Xerces to the endorsed dirs so that it is picked up by my web-app in Tomcat because it is documented that way on http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html. I didn't know that this doesn't apply to JDK 6.

It works fine when I just add Xerces to my war. This makes everything a lot easier :)

Thanks for your help. 

> 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/j-users@xerces.apache.org/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: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org


[jira] Issue Comment Edited: (XERCESJ-1466) ElementTraversal interface not found

Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESJ-1466?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12907644#action_12907644 ] 

Michael Glavassevich edited comment on XERCESJ-1466 at 9/9/10 11:08 AM:
------------------------------------------------------------------------

Working as designed. You *must* include xml-apis.jar on your classpath. This has always been required and should also work with Java 6 without using the endorsed standards override mechanism.

      was (Author: mrglavas@ca.ibm.com):
    Working as designed. You *must* include xml-apis.jar on your classpath. This has always been required.
  
> 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/j-users@xerces.apache.org/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: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org


[jira] Reopened: (XERCESJ-1466) ElementTraversal interface not found

Posted by "Thomas Krammer (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESJ-1466?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Krammer reopened XERCESJ-1466:
-------------------------------------


Then perhaps fix the default factory name in XPathFactoryFinder so that doing so doesn't break XPath?

> 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/j-users@xerces.apache.org/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: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org


[jira] Resolved: (XERCESJ-1466) ElementTraversal interface not found

Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESJ-1466?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Glavassevich resolved XERCESJ-1466.
-------------------------------------------

    Resolution: Not A Problem

Working as designed. You *must* include xml-apis.jar on your classpath. This has always been required.

> 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/j-users@xerces.apache.org/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: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org


[jira] Resolved: (XERCESJ-1466) ElementTraversal interface not found

Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESJ-1466?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Glavassevich resolved XERCESJ-1466.
-------------------------------------------

    Resolution: Not A Problem

The only thing broken here is your expectations. You are using the Apache version of JAXP whose defaults correspond to projects used within the ASF (Xerces, Xalan and Woodstox).  If you put xml-apis.jar in the endorsed directory you need all of those other projects on your classpath or must set the factory properties to the implementations you desire.

> 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/j-users@xerces.apache.org/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: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org


[jira] Commented: (XERCESJ-1466) ElementTraversal interface not found

Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
    [ 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/j-users@xerces.apache.org/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: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org