日期:2014-05-20  浏览次数:20787 次

再次求帮助第一次搭建SSH 遇到问题了
spring整合hibernate没问题 加入struts后启动服务器报错啊
换了几个版本的struts的jar包 都是不行啊



Exception starting filter struts2
Unable to load configuration. - bean - jar:file:/E:/apache-tomcat-7.0.11/webapps/ssh/WEB-INF/lib/struts2-core-2.2.3.1.jar!/struts-default.xml:29:72
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:428)
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:273)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:254)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:372)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:98)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4542)
at org.apache.catalina.core.StandardContext$2.call(StandardContext.java:5220)
at org.apache.catalina.core.StandardContext$2.call(StandardContext.java:5215)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
Caused by: Unable to load configuration. - bean - jar:file:/E:/apache-tomcat-7.0.11/webapps/ssh/WEB-INF/lib/struts2-core-2.2.3.1.jar!/struts-default.xml:29:72
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:69)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:371)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:415)
... 14 more
Caused by: Unable to load bean: type: class:com.opensymphony.xwork2.ObjectFactory - bean - jar:file:/E:/apache-tomcat-7.0.11/webapps/ssh/WEB-INF/lib/struts2-core-2.2.3.1.jar!/struts-default.xml:29:72
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:232)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:101)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:180)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66)
... 16 more
Caused by: Bean type class com.opensymphony.xwork2.ObjectFactory with the name xwork has already been loaded by bean - jar:file:/E:/apache-tomcat-7.0.11/webapps/ssh/WEB-INF/lib/struts2-core-2.2.1.jar!/struts-default.xml:29:72 - bean - jar:file:/E:/apache-tomcat-7.0.11/webapps/ssh/WEB-INF/lib/struts2-core-2.2.3.1.jar!/struts-default.xml:29:72
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:216)
... 19 more

------解决方案--------------------
探讨
是这个问题

Illegal access: this web application instance has been stopped already. Could not load java.net.BindException. The eventual following stack trace is caused by an error thrown for debugging pu……

------解决方案--------------------
Spring 和 Struts的jar包重复了
antlr-2.7.2(Struts 2 Core Libraries)
antlr-2.7.6(Hibernate 3.2 Core Libraries)

aopalliance-1.0(Struts 2 Core Libraries) same
aopalliance (Spring AOP Libraries) same

asm-2.2.3(Spring AOP Libraries)
asm (Hibernate 3.2 Core Libraries) -1.5.3

commons-collections-2.1.1 (Hibernate 3.2 Core Libraries)