XStream Notes

Using xstream-1.4.2.jar, and got the following problem:

Exception in thread "main" java.lang.NoClassDefFoundError: org/xmlpull/v1/XmlPullParserException
at com.thoughtworks.xstream.XStream.<init>(XStream.java:336)
at com.hempire.xstream.Writer.main(Writer.java:22)

The XML Pull Parser API defines an own mechanism to load the factory for the available XPP (XML Pull Parser) implementation. XStream's XppDriver never used this lookup mechanism automatically before version 1.4, now it will. Therefore you will have to add a dependency to xmlpull if the XPP implementation does not deliver the classes on its own. This dependency is necessary for Xpp3 in contrast to kXML2 that contains the classes. Use the Xpp3Driver or the KXml2Driver if you want to select one of the directly supported XPP implementation on your own without using the XPP factory. Note, that the minimal version of kXML2 does not support the XPP factory, but can be used by the KXml2Driver.

I honestly don't understand what the above means, but the bottom line is if we include any of the following jars, you should be fine:

kxml2-2.3.0.jar
kxml2-min-2.3.0.jar
xmlpull-1.1.3.1.jar
xpp3_min-1.1.4c.jar

kXML2 is recommend for use as it will greatly improve the performance of XStream.

Supported XML parsers and packages: