[jdom-interest] Problem Using XPath in JDOM
JLathren at transmontaigne.com
JLathren at transmontaigne.com
Thu Sep 25 09:38:26 PDT 2003
Hi.
I am attempting to get XPath calls working through Java using JDOM 9. I am
experiencing problems at the point of making the call
XPath.newInstance("/CustodyTicket").
I am running jdk1.4.2 and jakarta-tomcat 4.1.24 within Eclipse
2.1.1. Within my project, I have the following jars in my build path in
this order:
xerces.jar (from the jdom 9 download)
jaxen-core.jar (from the jdom 9 download)
jaxen-jdom.jar (from the jdom 9 download)
jdom.jar (from the jdom 9 download)
saxpath.jar (from the jdom 9 download)
xalan.jar (from the jdom 9 download)
xml-apis.jar (from the jdom 9 download)
The exception thrown to the browser is 'java.lang.NoClassDefFoundError:
org/saxpath/SAXPathException'. This would indicate a build path problem.
Looking into it closer, what is actually failing is the call
Class.forName(className) where className is "org.jdom.xpath.JaxenXPath".
This would also indicate a buildpath problem.
Based on the similar FAQ posting, I have put the xerces.jar as the top jar
in the build path.
Any help that could be provided would be greatly appreciated.
Thank you -
Jame
More information about the jdom-interest
mailing list