求问,关于struts2升级问题

公司用的struts 2.1 要求升级到2.3.34以上
我按照CSDN的步骤详细的改了struts2.xml和web.xml配置以及更新了一些jar。
如何解决错误呢?
发现启动tomcat7后出现大量错误:

  • Unable to load config class com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor at interceptor - jar:file:/E:/Program%20Files%20(x86)/apache/apache-tomcat-7.0.84/webapps/tjbank/WEB-INF/lib/struts2-core-2.3.34.jar!/struts-default.xml:202:116 probably due to a missing jar, which might be fine if you never plan to use the exception interceptor
  • Actual exception Caught Exception while registering Interceptor class com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor - interceptor - jar:file:/E:/Program%20Files%20(x86)/apache/apache-tomcat-7.0.84/webapps/tjbank/WEB-INF/lib/struts2-core-2.3.34.jar!/struts-default.xml:202:116

Caused by: java.lang.IllegalArgumentException: unknown reserved key '_typeConverter'

  • Unable to load config class org.apache.struts2.interceptor.ServletConfigInterceptor at interceptor - jar:file:/E:/Program%20Files%20(x86)/apache/apache-tomcat-7.0.84/webapps/tjbank/WEB-INF/lib/struts2-core-2.3.34.jar!/struts-default.xml:213:112 probably due to a missing jar, which might be fine if you never plan to use the servletConfig interceptor- Unable to load config class com.opensymphony.xwork2.interceptor.PrepareInterceptor at interceptor - jar:file:/E:/Program%20Files%20(x86)/apache/apache-tomcat-7.0.84/webapps/tjbank/WEB-INF/lib/struts2-core-2.3.34.jar!/struts-default.xml:210:105 probably due to a missing jar, which might be fine if you never plan to use the prepare interceptor

struts2-core-2.3.34.jar 这个核心包是不是冲突了?检查一下jar包是否存在错误或冲突

config配置的问题吧,翻译下英文感觉的

如果你的struts.xml和applicationContext.xml都配置正确,还报以上的错误,那么可以判断你的项目缺少jar包:
struts2-spring-plugin-2.0.11.1.jar、commons-fileupload-1.2.1.jar和commons-io-1.3.2.jar
导入这些jar包就行了,这些jar可以在struts-2.2.1的lib下找到。
在搭工程的时候,commons-fileupload-1.2.1.jar和commons-io-1.3.2.jar要是忘记了,报错很容易就看出来少哪些jar包,
但是struts2-spring-plugin-2.0.11.1.jar不太容易发现。

还有可能就是xml配置错误:

<!-- 配置允许文件上传类型 -->
image/bmp,image/jpeg,image/gif,image/png
<!-- 配置允许文件上传大小最大值 -->
512000

login.jsp


修改如下即可:

struts2-spring-plugin-2.3.34.jar
commons-fileupload-1.3.1.jar
commons-io-2.5.jar
这些我都有啊。。。。。。是不是版本不对呢?
还有applicationContext.xml里面的是spring3的内容

报缺失某些包的原因还有可能是有包冲突了,有可能是有两个版本不同的包,也有可能在新的版本里面,一个核心包,包含了以前好几个包的东西,你以前的那些包只删除了以前的核心包。简单说就是有可能是包冲突了

![图片说明](https://img-ask.csdn.net/upload/201802/07/1517985349_964394.png)图片说明图片说明图片说明图片说明这些是lib下的包