java.lang.NoClassDefFoundError: org/apache/commons/lang/xwork/StringUtils

java.lang.NoClassDefFoundError: org/apache/commons/lang/xwork/StringUtils

Struts2框架下使用JSON插件时。程序保存找不到类org/apache/commons/lang/xwork/StringUtils

 

几种可能的错误及解决方法:

1、没有commons-lang,xwork-core-2.2.1.1.jar。导入jar 包

2、须要把你的commons-lang.jar升级到新版,commons-lang3-3.1.jar,但要注意。最新的commons-lang3-3.1.jar 没有org.apache.commons.lang.StringUtils。

3、使用的struts2较高版本号struts2.3.4。该版本号已经自己包括xwork这个包。把xwork-2.0.4.jar删了  

4、主要问题:导入的xwork-core-2.3.4.1.jar这个jar包没有xwork,导入了xwork-core-2.2.1.1.jar这个包。

原文地址:https://www.cnblogs.com/jzssuanfa/p/6860121.html