错误:
在Myeclipse.65 在配置struts2 时加入了包 commons-logging-1.1.1,ognl-3.0.4 ,xwork-core-2.3.1.2 ,freemarker-2.3.18 , struts2-core-2.3.1.2 这5个核心包时出现错误,
好吧,这个版本比较高,是struts2.3以后的版本了。所以我们则需要导入包:commons-io-2.0.1,commons-fileupload-1.2.2 这个两个包
这时出现:java.lang.NoClassDefFoundError: org/apache/commons/lang/StringUtils 错误,原因是没有找到
org.apache.commons.lang下这个StringUtils类,这时我们需要导入包:commons-lang3-3.1.jar 这个包。
这时运行又出现错误:java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
这时我们又需要导入包:javassist-3.11.0.GA 包
经过测试,ok,不再报错
总结,为了使struts2导入包的时候小出现错误总共需要导入的包:commons-logging-1.1.1,ognl-3.0.4 ,xwork-core-2.3.1.2 ,freemarker-2.3.18 , struts2-core-2.3.1.2,
commons-io-2.0.1,commons-fileupload-1.2.2,javassist-3.11.0.GA,commons-lang3-3.1.jar 这9个包
亲身经验过的,给记下来,以免下次又忘记