Struts2配置问题


1、Unable to load bean: type: class:com.opensymphony.xwork2.ObjectFactory - bean - jar:file:/D:/Program%20Files/apache-tomcat-6.0.35/webapps/StrutsPro/WEB-INF/lib/struts2-core-2.3.4.jar!/struts-default.xml:29:72

是由于tomcat本身的lib就有struts需要的包,而我们又自己添加了包而产生的冲突。

 

2、只添加了5个包是不够的xwork-x.x.x.jar、commons-logging-x.x.x.jar、freemarker-x.x.x.jar、ognl-x.x.x.jar、struts2-core-x.x.x.jar)

问题:严重: Dispatcher initialization failed
  java.lang.RuntimeException: java.lang.reflect.InvocationTargetException

解决方法:添加javassist-x.x.x.ga.jar

问题:警告: Could not create JarEntryRevision for [jar:file:/D:/Program%20Files/apache-tomcat-6.0.35/webapps/StrutsPro/WEB-INF/lib/struts2-core-2.3.4.jar]!
java.lang.NoClassDefFoundError: org/apache/commons/io/FileUtils

解决方法:添加commons-io-x.x.x.jar

问题:严重: Exception starting filter struts2
java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringUtils

解决方法:添加commons-langx.x.x.jar

问题:严重: Dispatcher initialization failed
Unable to load configuration. - bean - jar:file:/D:/Program%20Files/apache-tomcat-6.0.35/webapps/StrutsPro/WEB-INF/lib/struts2-core-2.3.4.jar!/struts-default.xml:51:178

.

.

.

Caused by: java.lang.ClassNotFoundException: org.apache.commons.fileupload.RequestContext

解决方法:添加commons-fileupload-x.x.x.jar


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM