eclipse ssh 整合 运行 tomcat 7.x出错,望大神指定一二 10C

严重: Dispatcher initialization failed
Unable to load configuration. - bean - file:/G:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/ssh_crm/WEB-INF/classes/struts.xml:12:128
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70)
at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:970)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:438)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:482)
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:279)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:105)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4950)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5652)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1700)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1690)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: Unable to load bean: type:com.opensymphony.xwork2.ObjectFactory class:org.apache.struts2.spring.StrutsSpringObjectFactory - bean - file:/G:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/ssh_crm/WEB-INF/classes/struts.xml:12:128
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:247)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:102)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:240)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
... 17 more
Caused by: Bean type class com.opensymphony.xwork2.ObjectFactory with the name spring has already been loaded by [unknown location] - bean - file:/G:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/ssh_crm/WEB-INF/classes/struts.xml:12:128
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:231)
... 20 more

十月 19, 2017 11:06:38 下午 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter struts2
Unable to load configuration. - bean - file:/G:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/ssh_crm/WEB-INF/classes/struts.xml:12:128
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:496)
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:279)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:105)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4950)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5652)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1700)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1690)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: Unable to load configuration. - bean - file:/G:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/ssh_crm/WEB-INF/classes/struts.xml:12:128
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70)
at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:970)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:438)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:482)
... 14 more
Caused by: Unable to load bean: type:com.opensymphony.xwork2.ObjectFactory class:org.apache.struts2.spring.StrutsSpringObjectFactory - bean - file:/G:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/ssh_crm/WEB-INF/classes/struts.xml:12:128
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:247)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:102)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:240)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
... 17 more
Caused by: Bean type class com.opensymphony.xwork2.ObjectFactory with the name spring has already been loaded by [unknown location] - bean - file:/G:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/ssh_crm/WEB-INF/classes/struts.xml:12:128
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:231)
... 20 more

8个回答

一般情况先检查你的各个框架的配置文件,其次在web.xml中配置对应的过滤器,监听器,这种问题 只能你自己慢慢搞定了

struts.xml 从报错上看,第12行写的有问题

struts.xml:12:128这个位置是什么鬼。。一步步排查下!

应该是你已经在spring ioc容器中有一个ObjectFactory 的bean跟struts的冲突了

Caused by: Bean type class com.opensymphony.xwork2.ObjectFactory with the name spring has already been loaded by [unknown location] - bean - file:/G:/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/ssh_crm/WEB-INF/classes/struts.xml:12:128
主要看这个错误,查找ruts.xml对应的配置

截图struts.xml配置来看看

这是你strutus的所需jar包缺少,或者版本冲突,推荐去这个地方看看

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!