xstream XStream xstream = new XStream();报错

引入了xstream-1.4.2.jar后
XStream xs = new XStream(new DomDriver());  这句正常

但是XStream xstream = new XStream();  这句会报错

因为他们的引入路径都是com.thoughtworks.xstream.XStream.给人一种混淆,误以为只要引入xstream.jar就可以了

实际上,XStream xstream = new XStream();  还需要引入xmlpull-1.1.3.1.jar

引入我是通过webservers客户端调用,服务器端没有报错信息,所以在服务器端使用main测试 new XStream();  为题就暴露出来了,classNotFound

黑色头发:http://heisetoufa.iteye.com/

你可能感兴趣的:(xstream,xmlpull)