This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes java.lang.NoClassDefFoundError: com.sun.org.apache.xpath.internal.XPathAPI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "java.lang.NoClassDefFoundError: com.sun.org.apache.xpath.internal.XPathAPI" Watch "java.lang.NoClassDefFoundError: com.sun.org.apache.xpath.internal.XPathAPI" New topic
Forums: Java in General XML and Related Technologies
Author

java.lang.NoClassDefFoundError: com.sun.org.apache.xpath.internal.XPathAPI

Kishore Polsani
Greenhorn

Joined: May 20, 2012
Posts: 11
Hi,
Am using XPathAPI for parsing an xml file. Though i have added jars in lib folder am getting this error "java.lang.NoClassDefFoundError: com.sun.org.apache.xpath.internal.XPathAPI". Am using java 1.5. Any help is appreciated.


Thanks,
Kishore
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39072
    
  23
Don’t know. That might be a classpath problem; what classpath are you using?
Kishore Polsani
Greenhorn

Joined: May 20, 2012
Posts: 11
I have set the classpath as "CLASSPATH = /u01/apps/documentum/dba/java_methods/lib/*:". lib folder consists of all jars.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14194
    
  20

You're not supposed to be using any classes that are in a com.sun.* or sun.* package directly. Those packages are private parts of the JRE, and they can change or disappear between Java versions.

Why are you using this class? Isn't there a class in the standard API that you can use instead? See for example the javax.xml.* packages.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java.lang.NoClassDefFoundError: com.sun.org.apache.xpath.internal.XPathAPI