struts2 action中字符串转json对象出错 java.lang.NoClassDefFoundError: org/apache/commons/lang/exception/NestableRuntimeException

时间:2021-05-07 20:06:59

commons-lang包有错,要么是引入错误,要么是没引入。

报不同错误,引入不同包。

commons-beanutils-1.8.0.jar不加这个包 
java.lang.NoClassDefFoundError: org/apache/commons/beanutils/DynaBean 
commons-collections.jar 不加这个包 
java.lang.NoClassDefFoundError: org/apache/commons/collections/map/ListOrderedMap
commons-lang-2.4.jar不加这个包 
java.lang.NoClassDefFoundError: org/apache/commons/lang/exception/NestableRuntimeException
commons-logging-1.1.1.jar不加这个包 
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory 
ezmorph-1.0.4.jar不加这个包 
java.lang.NoClassDefFoundError: net/sf/ezmorph/Morpher 
json-lib-2.3-jdk15.jar不加这个包 
java.lang.NoClassDefFoundError: net/sf/json/JSONObject

参考:http://blog.csdn.net/zenson_g/article/details/8491436