Liviu and Jörg, I am just starting to use this API as well, and I found that I could not use the kxml-min-xxx.jar. I needed the full kxml2-2.3.0.jar to work properly.
Serializing to XML worked fine with the -min jar, but deserialization required the full jar. Or possibly there is a combination of other external jars with the -min jar which would also work, such as a separate xmlpull. I am not going to fret over 30-40kb, and I haven't spent the time to research, sorry! Deserialization with the -min jar: Caused by: java.lang.ClassNotFoundException: org.xmlpull.v1.XmlPullParserFactory Thanks, Kevin -----Original Message----- From: Jörg Schaible [mailto:[email protected]] Sent: Monday, November 21, 2011 5:27 AM To: [email protected] Subject: [xstream-user] Re: java.lang.NoClassDefFoundError: org/xmlpull/v1/XmlPullParserFactory Hi Liviu, Liviu wrote: > Hi all, > > I'm having the same problem, using xstream-1.4.2 (just switched from > java.beans.XMLEncoder/XMLDecoder): > > Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: > org/ xmlpull/v1/XmlPullParserException at > com.thoughtworks.xstream.XStream.<init>(XStream.java:336) > .... > Caused by: java.lang.ClassNotFoundException: > org.xmlpull.v1.XmlPullParserException > at java.net.URLClassLoader$1.run(Unknown Source) ... > > The exception occurs right on constructor: > XStream xstream = new XStream(); > > > I tried to follow the tutorial from > http://xstream.codehaus.org/tutorial.html and I also read the FAQ as > Jörg suggested; I added xstream, xpp, kxml2 and xmlpull (in variuos > combinations :) ) to the build path (I'm using Ecplise) but with no > success. > > I spent half a day googling around... what am I missing? You miss the dependency to xmlpull. Sorry, but I cannot say something else. This is what the error indicates. - Jörg -----Message Disclaimer----- This e-mail message is intended only for the use of the individual or entity to which it is addressed, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not the intended recipient, any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by reply email to [email protected] and delete or destroy all copies of the original message and attachments thereto. Email sent to or from the Principal Financial Group or any of its member companies may be retained as required by law or regulation. Nothing in this message is intended to constitute an Electronic signature for purposes of the Uniform Electronic Transactions Act (UETA) or the Electronic Signatures in Global and National Commerce Act ("E-Sign") unless a specific statement to the contrary is included in this message. While this communication may be used to promote or market a transaction or an idea that is discussed in the publication, it is intended to provide general information about the subject matter covered and is provided with the understanding that The Principal is not rendering legal, accounting, or tax advice. It is not a marketed opinion and may not be used to avoid penalties under the Internal Revenue Code. You should consult with appropriate counsel or other advisors on all matters pertaining to legal, tax, or accounting obligations and requirements.
