Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Kishore Polsani
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 49789
69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don’t know. That might be a classpath problem; what classpath are you using?
 
Kishore Polsani
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 15441
41
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic