This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java Micro Edition and the fly likes java.lang.NoClassDefFoundError: org/kxml2/io/KXmlParser 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 » Mobile » Java Micro Edition
Bookmark "java.lang.NoClassDefFoundError: org/kxml2/io/KXmlParser" Watch "java.lang.NoClassDefFoundError: org/kxml2/io/KXmlParser" New topic

java.lang.NoClassDefFoundError: org/kxml2/io/KXmlParser

rajeshyadav mobi

Joined: Apr 18, 2011
Posts: 25
Hi ,
This is Rajesh

when i am parsing an xml file in Eclipse using kxml2-min-2.3.0.jar file i am getting this error
java.lang.NoClassDefFoundError: org/kxml2/io/KXmlParser
i had added and removed this jar file from lib folder, Still i am getting this exception ,
please help me how to slove this problem.
Waiting for reply
Paul Clapham

Joined: Oct 14, 2005
Posts: 18541

First of all you'll want to be sure you have a jar file containing that class. And second, you'll want to be sure that jar file is in the class path when you run something which needs it. And third, when you have this problem you'll want to see the whole stack trace and not just the description of the exception.
rajeshyadav mobi

Joined: Apr 18, 2011
Posts: 25
Hi Paul,
I Checked The Classes In The Jar File and all The Classes are Available in The Jar File
Still i am Getting The Same Problem ,
Please Help Me Out To Slove This Problem.
Vijay Dogra

Joined: Sep 16, 2004
Posts: 22
Try using the sources instead of JAR file. This will also help you in deploying the final module into your device. The error that you are getting is due to wrong inclusion of kxml.jar file. ( I assume you had used the minimal version, although it should include the class that you are referring to)
subject: java.lang.NoClassDefFoundError: org/kxml2/io/KXmlParser
Similar Threads
java.lang.NoClassDefFoundError: org/hibernate/annotations/Entity
first program error, something is missing
Upload files from client
Parse xml document in j2me
Storing images in database