错误信息
严重: Exception starting filter struts2
Unable to load configuration. - bean - jar:file:/F:/Struts2/Struts2/WebRoot/WEB-
INF/lib/struts2-core-2.1.2.jar!/struts-default.xml:46:178
解决办法
少jar包,添加
commons-fileupload-1.2.1.jar
commons-io-1.3.2.jar
错误信息
org.springframework.beans.factory.BeanCreationException: Error creating bean with name
'sessionFactory' defined in ServletContext resource [/WEB-
INF/classes/applicationContext.xml]: Invocation of init method failed; nested exception is
java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit
(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V
解决办法:
Spring中的asm-xxx.jar 和 Hibernate中的 asm.jar 冲突,移除 spring aop 中的 asm-xxx.jar 或者
出现 action 为null 时 移除 spring aop
错误信息
Exception starting filter struts2
Cannot locate the chosen ObjectFactory implementation: The
com.opensymphony.xwork2.ObjectFactory implementation class - [unknown location]
解决办法:
少jar包,添加struts2-spring-plugin-2.0.14.jar
struts.xml中,加上一句话
<constant name="struts.objectFactory" value="spring"/>