Struts2 jQuery struts-plugin.xml invalid

谁说胖子不能爱 提交于 2019-12-02 05:30:35
Andrea Ligios

You need to add the commons-lang3-3.x.jar to your classpath for the filter to run.

You must ensure you don't have multiple versions of commons-lang3-x.x.jar too.

commons-lang3-x.x.jar and commons-lang-x.x.jar instead can coexist in the same classpath, because the package is different (they did it on purpose ;)


This can be known, because of NoClassDefFoundError:

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

which occurs mostly in two cases:

  • at runtime, you doesn't have the library,
  • or you have two versions of the library, hence the classloader doesn't know which to pick, and raises the exception.

The lang3 in the package means that the StringUtils class missing is from common-lang3-*.jar, not from common-lang-*.jar.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!