最近整理下 Mybatis 3.0 +Struts 2.1.8 + Spring 3.0 老是报下图的错:
犀利的问题把人调的崩溃了;原因为 Struts2.1.8的【struts2-rest-plugin-2.1.8.1.jar】 包在搞鬼,默认提交的Action首先执行一个create()方法,不知知道为何,谁知道就解释下,
找到了原因将【struts2-rest-plugin-2.1.8.1.jar】包直接remove 掉如下图:
重新部署,启动Tomcat,直接运行OKl了,打完收工,同时下边附上自己的调试成功包名:
antlr-2.7.2.jar
aopalliance-1.0.jar
classworlds-1.1.jar
com.springsource.com.caucho-3.2.1.jar
com.springsource.com.ibatis-2.3.4.726.jar
com.springsource.com.mchange.v2.c3p0-0.9.1.2.jar
com.springsource.javax.jdo-2.1.0.jar
com.springsource.net.sf.cglib-2.2.0.jar
com.springsource.org.aopalliance-1.0.0.jar
com.springsource.org.apache.commons.fileupload-1.2.0.jar
com.springsource.org.apache.commons.httpclient-3.1.0.jar
com.springsource.org.apache.commons.lang-2.4.0.jar
com.springsource.org.apache.commons.logging-1.1.1.jar
com.springsource.org.apache.commons.pool-1.5.3.jar
com.springsource.org.apache.log4j-1.2.15.jar
com.springsource.org.aspectj.weaver-1.6.8.RELEASE.jar
com.springsource.org.codehaus.jackson.mapper-1.0.0.jar
commons-beanutils-1.7.0.jar
commons-chain-1.2.jar
commons-collections-3.2.jar
commons-dbcp.jar
commons-digester-2.0.jar
commons-fileupload-1.2.1.jar
commons-io-1.3.2.jar
commons-lang-2.3.jar
commons-logging-1.0.4.jar
commons-logging-api-1.1.jar
commons-validator-1.3.1.jar
dwr-1.1.1.jar
freemarker-2.3.15.jar
jotm.jar
jsf-api.jar
jsf-impl.jar
json-lib-2.1.jar
jstl-1.2.jar
mybatis-3.0.2.jar
mybatis-3.0.3-SNAPSHOT.jar
mybatis-spring-1.0.0-RC2.jar
ognl-2.7.3.jar
org.springframework.aop-3.0.1.RELEASE-A.jar
org.springframework.asm-3.0.1.RELEASE-A.jar
org.springframework.aspects-3.0.1.RELEASE-A.jar
org.springframework.beans-3.0.1.RELEASE-A.jar
org.springframework.context-3.0.1.RELEASE-A.jar
org.springframework.core-3.0.1.RELEASE-A.jar
org.springframework.expression-3.0.1.RELEASE-A.jar
org.springframework.instrument-3.0.1.RELEASE-A.jar
org.springframework.instrument.tomcat-3.0.1.RELEASE-A.jar
org.springframework.jdbc-3.0.1.RELEASE-A.jar
org.springframework.jms-3.0.1.RELEASE-A.jar
org.springframework.orm-3.0.1.RELEASE-A.jar
org.springframework.oxm-3.0.1.RELEASE-A.jar
org.springframework.transaction-3.0.1.RELEASE-A.jar
org.springframework.web-3.0.1.RELEASE-A.jar
org.springframework.web.portlet-3.0.1.RELEASE-A.jar
org.springframework.web.servlet-3.0.1.RELEASE-A.jar
org.springframework.web.struts-3.0.1.RELEASE-A.jar
oro-2.0.8.jar
persistence.jar
spring-beans-2.5.6.jar
spring-context-2.5.6.jar
spring-core-2.5.6.jar
spring-web-2.5.6.jar
sqljdbc4.jar
sslext-1.2-0.jar
struts2-convention-plugin-2.1.8.1.jar
struts2-core-2.1.8.1.jar
struts2-dojo-plugin-2.1.8.1.jar
struts2-dwr-plugin-2.1.8.1.jar
struts2-embeddedjsp-plugin-2.1.8.1.jar
struts2-jfreechart-plugin-2.1.8.1.jar
struts2-json-plugin-2.1.8.1.jar
struts2-spring-plugin-2.1.8.1.jar
xapool.jar
xwork-core-2.1.6.jar