wood burning stoves 2.0*
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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: 38033
    
  22
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: 14074
    
  16

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 7 API documentation
Scala Notes - My blog about Scala
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: java.lang.NoClassDefFoundError: com.sun.org.apache.xpath.internal.XPathAPI
 
Similar Threads
java.lang.NoClassDefFoundError: org/hibernate/annotations/Entity
Running a java program with full path\class name
java.lang.NoClassDefFoundError: org/kxml2/io/KXmlParser
IDE
An exception throws in hibernate