struts2从2.3.15升级到2.3.36后项目报错

求助!SSH项目,升级struts2的版本后,项目报错无法运行,异常内容如下:

[ERROR] 2018-12-10 12:54:52,360 org.apache.struts2.dispatcher.Dispatcher - Dispatcher initialization failed
java.lang.RuntimeException: java.lang.RuntimeException: com.opensymphony.xwork2.inject.DependencyException: com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No mapping found for dependency [type=com.opensymphony.xwork2.factory.ActionFactory, name='default'] in public void com.opensymphony.xwork2.ObjectFactory.setActionFactory(com.opensymphony.xwork2.factory.ActionFactory).
    at com.opensymphony.xwork2.inject.ContainerBuilder$4.create(ContainerBuilder.java:132)
    at com.opensymphony.xwork2.inject.Scope$2$1.create(Scope.java:51)
    at com.opensymphony.xwork2.inject.ContainerImpl.getInstance(ContainerImpl.java:514)
    at com.opensymphony.xwork2.inject.ContainerImpl.getInstance(ContainerImpl.java:524)
    at com.opensymphony.xwork2.inject.ContainerImpl$9.call(ContainerImpl.java:555)
    at com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:584)
    at com.opensymphony.xwork2.inject.ContainerImpl.getInstance(ContainerImpl.java:553)
    at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:257)
    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
    at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:978)
    at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:446)
    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:490)
    at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
    at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57)
    at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:285)
    at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:266)
    at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
    at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4699)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5339)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: com.opensymphony.xwork2.inject.DependencyException: com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No mapping found for dependency [type=com.opensymphony.xwork2.factory.ActionFactory, name='default'] in public void com.opensymphony.xwork2.ObjectFactory.setActionFactory(com.opensymphony.xwork2.factory.ActionFactory).
    at com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:502)
    at com.opensymphony.xwork2.inject.ContainerImpl$7.call(ContainerImpl.java:539)
    at com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:593)
    at com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:537)
    at com.opensymphony.xwork2.config.impl.LocatableFactory.create(LocatableFactory.java:32)
    at com.opensymphony.xwork2.inject.ContainerBuilder$4.create(ContainerBuilder.java:130)
    ... 25 more
Caused by: com.opensymphony.xwork2.inject.DependencyException: com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No mapping found for dependency [type=com.opensymphony.xwork2.factory.ActionFactory, name='default'] in public void com.opensymphony.xwork2.ObjectFactory.setActionFactory(com.opensymphony.xwork2.factory.ActionFactory).
    at com.opensymphony.xwork2.inject.ContainerImpl.addInjectorsForMembers(ContainerImpl.java:144)
    at com.opensymphony.xwork2.inject.ContainerImpl.addInjectorsForMethods(ContainerImpl.java:113)
    at com.opensymphony.xwork2.inject.ContainerImpl.addInjectors(ContainerImpl.java:90)
    at com.opensymphony.xwork2.inject.ContainerImpl.addInjectors(ContainerImpl.java:86)
    at com.opensymphony.xwork2.inject.ContainerImpl.addInjectors(ContainerImpl.java:86)
    at com.opensymphony.xwork2.inject.ContainerImpl$1.create(ContainerImpl.java:71)
    at com.opensymphony.xwork2.inject.ContainerImpl$1.create(ContainerImpl.java:67)
    at com.opensymphony.xwork2.inject.util.ReferenceCache$CallableCreate.call(ReferenceCache.java:150)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at com.opensymphony.xwork2.inject.util.ReferenceCache.internalCreate(ReferenceCache.java:76)
    at com.opensymphony.xwork2.inject.util.ReferenceCache.get(ReferenceCache.java:116)
    at com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.<init>(ContainerImpl.java:356)
    at com.opensymphony.xwork2.inject.ContainerImpl$5.create(ContainerImpl.java:311)
    at com.opensymphony.xwork2.inject.ContainerImpl$5.create(ContainerImpl.java:307)
    at com.opensymphony.xwork2.inject.util.ReferenceCache$CallableCreate.call(ReferenceCache.java:150)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at com.opensymphony.xwork2.inject.util.ReferenceCache.internalCreate(ReferenceCache.java:76)
    at com.opensymphony.xwork2.inject.util.ReferenceCache.get(ReferenceCache.java:116)
    at com.opensymphony.xwork2.inject.ContainerImpl.getConstructor(ContainerImpl.java:607)
    at com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:498)
    ... 30 more
Caused by: com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No mapping found for dependency [type=com.opensymphony.xwork2.factory.ActionFactory, name='default'] in public void com.opensymphony.xwork2.ObjectFactory.setActionFactory(com.opensymphony.xwork2.factory.ActionFactory).
    at com.opensymphony.xwork2.inject.ContainerImpl.createParameterInjector(ContainerImpl.java:239)
    at com.opensymphony.xwork2.inject.ContainerImpl.getParametersInjectors(ContainerImpl.java:229)
    at com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.<init>(ContainerImpl.java:293)
    at com.opensymphony.xwork2.inject.ContainerImpl$3.create(ContainerImpl.java:117)
    at com.opensymphony.xwork2.inject.ContainerImpl$3.create(ContainerImpl.java:114)
    at com.opensymphony.xwork2.inject.ContainerImpl.addInjectorsForMembers(ContainerImpl.java:141)
    ... 49 more
十二月 10, 2018 12:54:52 下午 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter struts
java.lang.RuntimeException: com.opensymphony.xwork2.inject.DependencyException: com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No mapping found for dependency [type=com.opensymphony.xwork2.factory.ActionFactory, name='default'] in public void com.opensymphony.xwork2.ObjectFactory.setActionFactory(com.opensymphony.xwork2.factory.ActionFactory). - Class: com.opensymphony.xwork2.inject.ContainerBuilder$4
File: ContainerBuilder.java
Method: create
Line: 132 - com/opensymphony/xwork2/inject/ContainerBuilder.java:132:-1
    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:504)
    at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
    at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57)
    at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:285)
    at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:266)
    at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)
    at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4699)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5339)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: com.opensymphony.xwork2.inject.DependencyException: com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No mapping found for dependency [type=com.opensymphony.xwork2.factory.ActionFactory, name='default'] in public void com.opensymphony.xwork2.ObjectFactory.setActionFactory(com.opensymphony.xwork2.factory.ActionFactory).
    at com.opensymphony.xwork2.inject.ContainerBuilder$4.create(ContainerBuilder.java:132)
    at com.opensymphony.xwork2.inject.Scope$2$1.create(Scope.java:51)
    at com.opensymphony.xwork2.inject.ContainerImpl.getInstance(ContainerImpl.java:514)
    at com.opensymphony.xwork2.inject.ContainerImpl.getInstance(ContainerImpl.java:524)
    at com.opensymphony.xwork2.inject.ContainerImpl$9.call(ContainerImpl.java:555)
    at com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:584)
    at com.opensymphony.xwork2.inject.ContainerImpl.getInstance(ContainerImpl.java:553)
    at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:257)
    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
    at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:978)
    at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:446)
    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:490)
    ... 14 more
Caused by: java.lang.RuntimeException: com.opensymphony.xwork2.inject.DependencyException: com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No mapping found for dependency [type=com.opensymphony.xwork2.factory.ActionFactory, name='default'] in public void com.opensymphony.xwork2.ObjectFactory.setActionFactory(com.opensymphony.xwork2.factory.ActionFactory).
    at com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:502)
    at com.opensymphony.xwork2.inject.ContainerImpl$7.call(ContainerImpl.java:539)
    at com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:593)
    at com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:537)
    at com.opensymphony.xwork2.config.impl.LocatableFactory.create(LocatableFactory.java:32)
    at com.opensymphony.xwork2.inject.ContainerBuilder$4.create(ContainerBuilder.java:130)
    ... 25 more
Caused by: com.opensymphony.xwork2.inject.DependencyException: com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No mapping found for dependency [type=com.opensymphony.xwork2.factory.ActionFactory, name='default'] in public void com.opensymphony.xwork2.ObjectFactory.setActionFactory(com.opensymphony.xwork2.factory.ActionFactory).
    at com.opensymphony.xwork2.inject.ContainerImpl.addInjectorsForMembers(ContainerImpl.java:144)
    at com.opensymphony.xwork2.inject.ContainerImpl.addInjectorsForMethods(ContainerImpl.java:113)
    at com.opensymphony.xwork2.inject.ContainerImpl.addInjectors(ContainerImpl.java:90)
    at com.opensymphony.xwork2.inject.ContainerImpl.addInjectors(ContainerImpl.java:86)
    at com.opensymphony.xwork2.inject.ContainerImpl.addInjectors(ContainerImpl.java:86)
    at com.opensymphony.xwork2.inject.ContainerImpl$1.create(ContainerImpl.java:71)
    at com.opensymphony.xwork2.inject.ContainerImpl$1.create(ContainerImpl.java:67)
    at com.opensymphony.xwork2.inject.util.ReferenceCache$CallableCreate.call(ReferenceCache.java:150)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at com.opensymphony.xwork2.inject.util.ReferenceCache.internalCreate(ReferenceCache.java:76)
    at com.opensymphony.xwork2.inject.util.ReferenceCache.get(ReferenceCache.java:116)
    at com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.<init>(ContainerImpl.java:356)
    at com.opensymphony.xwork2.inject.ContainerImpl$5.create(ContainerImpl.java:311)
    at com.opensymphony.xwork2.inject.ContainerImpl$5.create(ContainerImpl.java:307)
    at com.opensymphony.xwork2.inject.util.ReferenceCache$CallableCreate.call(ReferenceCache.java:150)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at com.opensymphony.xwork2.inject.util.ReferenceCache.internalCreate(ReferenceCache.java:76)
    at com.opensymphony.xwork2.inject.util.ReferenceCache.get(ReferenceCache.java:116)
    at com.opensymphony.xwork2.inject.ContainerImpl.getConstructor(ContainerImpl.java:607)
    at com.opensymphony.xwork2.inject.ContainerImpl.inject(ContainerImpl.java:498)
    ... 30 more
Caused by: com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No mapping found for dependency [type=com.opensymphony.xwork2.factory.ActionFactory, name='default'] in public void com.opensymphony.xwork2.ObjectFactory.setActionFactory(com.opensymphony.xwork2.factory.ActionFactory).
    at com.opensymphony.xwork2.inject.ContainerImpl.createParameterInjector(ContainerImpl.java:239)
    at com.opensymphony.xwork2.inject.ContainerImpl.getParametersInjectors(ContainerImpl.java:229)
    at com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.<init>(ContainerImpl.java:293)
    at com.opensymphony.xwork2.inject.ContainerImpl$3.create(ContainerImpl.java:117)
    at com.opensymphony.xwork2.inject.ContainerImpl$3.create(ContainerImpl.java:114)
    at com.opensymphony.xwork2.inject.ContainerImpl.addInjectorsForMembers(ContainerImpl.java:141)
    ... 49 more

十二月 10, 2018 12:54:52 下午 org.apache.catalina.core.StandardContext startInternal
严重: One or more Filters failed to start. Full details will be found in the appropriate container log file
十二月 10, 2018 12:54:52 下午 org.apache.catalina.core.StandardContext startInternal
严重: Context [/pro30029] startup failed due to previous errors
十二月 10, 2018 12:54:52 下午 org.apache.catalina.core.ApplicationContext log
信息: Closing Spring root WebApplicationContext
4231 [localhost-startStop-1] INFO org.quartz.core.QuartzScheduler - Scheduler startQuertz_$_NON_CLUSTERED paused.
4233 [localhost-startStop-1] INFO org.quartz.core.QuartzScheduler - Scheduler startQuertz_$_NON_CLUSTERED shutting down.
4233 [localhost-startStop-1] INFO org.quartz.core.QuartzScheduler - Scheduler startQuertz_$_NON_CLUSTERED paused.
4234 [localhost-startStop-1] INFO org.quartz.core.QuartzScheduler - Scheduler startQuertz_$_NON_CLUSTERED shutdown complete.
十二月 10, 2018 12:54:52 下午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
警告: The web application [pro30029] appears to have started a thread named [startQuertz_Worker-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.lang.Object.wait(Native Method)
 org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:543)
十二月 10, 2018 12:54:52 下午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
警告: The web application [pro30029] appears to have started a thread named [startQuertz_Worker-2] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.lang.Object.wait(Native Method)
 org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:543)
十二月 10, 2018 12:54:52 下午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
警告: The web application [pro30029] appears to have started a thread named [startQuertz_Worker-3] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.lang.Object.wait(Native Method)
 org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:543)
十二月 10, 2018 12:54:52 下午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
警告: The web application [pro30029] appears to have started a thread named [startQuertz_Worker-4] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.lang.Object.wait(Native Method)
 org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:543)
十二月 10, 2018 12:54:52 下午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
警告: The web application [pro30029] appears to have started a thread named [startQuertz_Worker-5] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.lang.Object.wait(Native Method)
 org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:543)
十二月 10, 2018 12:54:52 下午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
警告: The web application [pro30029] appears to have started a thread named [startQuertz_Worker-6] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.lang.Object.wait(Native Method)
 org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:543)
十二月 10, 2018 12:54:52 下午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
警告: The web application [pro30029] appears to have started a thread named [startQuertz_Worker-7] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.lang.Object.wait(Native Method)
 org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:543)
十二月 10, 2018 12:54:52 下午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
警告: The web application [pro30029] appears to have started a thread named [startQuertz_Worker-8] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.lang.Object.wait(Native Method)
 org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:543)
十二月 10, 2018 12:54:52 下午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
警告: The web application [pro30029] appears to have started a thread named [startQuertz_Worker-9] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.lang.Object.wait(Native Method)
 org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:543)
十二月 10, 2018 12:54:52 下午 org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
警告: The web application [pro30029] appears to have started a thread named [startQuertz_Worker-10] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.lang.Object.wait(Native Method)
 org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:543)

web.xml中的相关配置如下:

<filter>
        <filter-name>struts</filter-name>
        <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
        <init-param>
            <param-name>config</param-name>
            <param-value>resource/struts/struts-default.xml,struts-plugin.xml,resource/struts/struts.xml</param-value>
        </init-param>
    </filter>

    <filter-mapping>
        <filter-name>struts</filter-name>
        <url-pattern>*.action</url-pattern>
    </filter-mapping>

请各位帮忙分析一下到底是什么问题?

1个回答

Lemostic
lemostic 就是引入了所以报的这个错,不过最后查出来是因为项目中原来引入的struts-default.xml中的内容和新版本的不兼容,引入新版本的struts-defualt.xml后问题就解决了,非常感谢!
一年多之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐