3

Sturst2无法成功加载配置

Unable to load configuration. - bean - jar:file:/F:/ecipseee/eclipse/workspace/activiti-web/WebContent/WEB-INF/lib/struts2-core-2.3.1.jar!/struts-default.xml:30:124
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:69)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:390)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:436)
at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)
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:4908)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5602)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1572)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1562)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: Unable to load bean: type:com.opensymphony.xwork2.ObjectFactory class:org.apache.struts2.impl.StrutsObjectFactory - bean - jar:file:/F:/ecipseee/eclipse/workspace/activiti-web/WebContent/WEB-INF/lib/struts2-core-2.3.1.jar!/struts-default.xml:30:124
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:235)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:102)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:180)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66)
... 17 more
Caused by: Bean type class com.opensymphony.xwork2.ObjectFactory with the name struts has already been loaded by bean - jar:file:/F:/java/maven/repository-teacher/org/apache/struts/struts2-core/2.3.24/struts2-core-2.3.24.jar!/struts-default.xml:57:72 - bean - jar:file:/F:/ecipseee/eclipse/workspace/activiti-web/WebContent/WEB-INF/lib/struts2-core-2.3.1.jar!/struts-default.xml:30:124
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:219)
... 20 more

配置文件错误解析:
1.加载struts2-core-2.3.1.jar错误
项目中已经导入该包
2.在默认配置的strust.xml中没有引用struts-default.xml:30:124

有没有大牛有这方面解答

查看全部
qq_29178991
___且听风吟
2016/06/08 16:39
  • 点赞
  • 收藏
  • 回答
    私信

1个回复