Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes XML and Related Technologies and the fly likes java.lang.NoClassDefFoundError: 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:" Watch "java.lang.NoClassDefFoundError:" New topic
Forums: Java in General XML and Related Technologies


Kishore Polsani

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

Campbell Ritchie

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

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: 14993

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:
subject: java.lang.NoClassDefFoundError:
jQuery in Action, 3rd edition