struts2.2.1升级到2.5
澳门赌场开户
澳门赌场开户
当前位置 : 澳门赌场开户 > 在线博彩导航

struts2.2.1升级到2.5

把原本2.2.1的javaweb项目升级到2.5.5
struts包用maven替换为2.5的之后,web.xml中类的名字

<filter>
        <filter-name>struts2</filter-name>
        <filter-class>org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>struts2</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

运行出现错误

严重: Exception starting filter struts2
java.lang.NoSuchMethodError: com.opensymphony.xwork2.config.ConfigurationManager.addConfigurationProviderLcom/opensymphony/xwork2/config/ConfigurationProvider;V
    at org.apache.struts2.dispatcher.Dispatcher.init_DefaultPropertiesDispatcher.java:307
    at org.apache.struts2.dispatcher.Dispatcher.initDispatcher.java:408
    at org.apache.struts2.dispatcher.InitOperations.initDispatcherInitOperations.java:75
    at org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter.initStrutsPrepareAndExecuteFilter.java:63
    at org.apache.catalina.core.ApplicationFilterConfig.initFilterApplicationFilterConfig.java:279
    at org.apache.catalina.core.ApplicationFilterConfig.getFilterApplicationFilterConfig.java:260
    at org.apache.catalina.core.ApplicationFilterConfig.<init>ApplicationFilterConfig.java:105
    at org.apache.catalina.core.StandardContext.filterStartStandardContext.java:4659
    at org.apache.catalina.core.StandardContext.startInternalStandardContext.java:5281
    at org.apache.catalina.util.LifecycleBase.startLifecycleBase.java:150
    at org.apache.catalina.core.ContainerBase$StartChild.callContainerBase.java:1408
    at org.apache.catalina.core.ContainerBase$StartChild.callContainerBase.java:1398
    at java.util.concurrent.FutureTask.runUnknown Source
    at java.util.concurrent.ThreadPoolExecutor.runWorkerUnknown Source
    at java.util.concurrent.ThreadPoolExecutor$Worker.runUnknown Source
    at java.lang.Thread.runUnknown Source

貌似这个struts类加载出错。即使我把struts.xml配置文件删除还是这错误

xwork2.jar 没有跟着一起升级的吗?

栏目列表

广告位

澳门赌场开户