当前位置:编程学习 > JAVA >>

第一次配置struts2.3 出现如下错误,求帮忙分析一下~

严重: Dispatcher initialization failed
Unable to load configuration. - bean - jar:file:/C:/Users/DELL/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/HelloStruts/WEB-INF/lib/struts2-gxp-plugin-2.3.4.1.jar!/struts-plugin.xml:8:162
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:437)
at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:277)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:382)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:103)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4650)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5306)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
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:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: Unable to load bean: type:org.apache.struts2.views.gxp.inject.InjectedObjectContainer class:org.apache.struts2.views.gxp.inject.InjectedObjectContainer - bean - jar:file:/C:/Users/DELL/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/HelloStruts/WEB-INF/lib/struts2-gxp-plugin-2.3.4.1.jar!/struts-plugin.xml:8:162
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:243)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:102)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:210)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66)
... 18 more
Caused by: java.lang.ClassNotFoundException: org.apache.struts2.views.gxp.inject.InjectedObjectContainer
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
at com.opensymphony.xwork2.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:152)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:214)
... 21 more
2012-11-7 16:04:57 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter struts2
Unable to load configuration. - bean - jar:file:/C:/Users/DELL/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/HelloStruts/WEB-INF/lib/struts2-gxp-plugin-2.3.4.1.jar!/struts-plugin.xml:8:162
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:450)
at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:277)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:382)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:103)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4650)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5306)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
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:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: Unable to load configuration. - bean - jar:file:/C:/Users/DELL/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/HelloStruts/WEB-INF/lib/struts2-gxp-plugin-2.3.4.1.jar!/struts-plugin.xml:8:162
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:437)
... 16 more
Caused by: Unable to load bean: type:org.apache.struts2.views.gxp.inject.InjectedObjectContainer class:org.apache.struts2.views.gxp.inject.InjectedObjectContainer - bean - jar:file:/C:/Users/DELL/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/HelloStruts/WEB-INF/lib/struts2-gxp-plugin-2.3.4.1.jar!/struts-plugin.xml:8:162
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:243)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:102)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:210)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66)
... 18 more
Caused by: java.lang.ClassNotFoundException: org.apache.struts2.views.gxp.inject.InjectedObjectContainer
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
at com.opensymphony.xwork2.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:152)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:214)
... 21 more
2012-11-7 16:04:57 org.apache.catalina.core.StandardContext startInternal
严重: Error filterStart
2012-11-7 16:04:57 org.apache.catalina.core.StandardContext startInternal
严重: Context [/HelloStruts] startup failed due to previous errors --------------------编程问答-------------------- 是不是把所有的jar包都加进去了啊! --------------------编程问答-------------------- 你在web.xml里配置了过滤器吗? --------------------编程问答-------------------- 除了配置文件就是包,一定要加载所有的包而且是无冲突的。 --------------------编程问答-------------------- 看问题:
Unable to load configuration. - bean - jar:file:/C:/Users/DELL/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/HelloStruts/WEB-INF/lib/struts2-gxp-plugin-2.3.4.1.jar!/struts-plugin.xml:
不能load jar:file --------------------编程问答-------------------- 少jar包了
--------------------编程问答-------------------- 少jar包了,仔细检查下吧 --------------------编程问答-------------------- 少包  或者包之间存在冲突! --------------------编程问答--------------------
引用 2 楼 LadyShao 的回复:
你在web.xml里配置了过滤器吗?
配置了啊 我把全部的包都倒进去了 --------------------编程问答-------------------- 看看你的workspace下缺那些包,补上就是啦 --------------------编程问答-------------------- 还一点就是你在添加struts的时候默认的勾都去掉,之后再lib下添加上面的jar包就行了,保你不会错 --------------------编程问答-------------------- 以下是我ssh整合的时候用的jar包请做参考
Spring 3.0.6
struts 2.3.3
hibernate 3.6.8 
SSH 整合方案步骤
======================================================
1.加入jar文件
commons-collections-3.1.jar
commons-fileupload-1.2.2.jar
commons-io-2.0.1.jar
commons-lang3-3.1.jar
freemarker-2.3.19.jar
struts2-core-2.3.3.jar
struts2-dojo-plugin-2.3.3.jar
struts2-spring-plugin-2.3.3.jar
xwork-core-2.3.3.jar

javassist-3.12.0.GA.jar

antlr-2.7.6.jar
dom4j-1.6.1.jar
hibernate-jpa-2.0-api-1.0.1.Final.jar
hibernate3.jar
slf4j-api-1.6.1.jar
jta-1.1.jar
ognl-3.0.5.jar
mysql-connector-java-5.1.18-bin.jar
Oracle10gDriver.jar
sqljdbc2008.jar

commons-logging-1.1.1.jar
org.springframework.asm-3.0.6.RELEASE.jar
org.springframework.beans-3.0.6.RELEASE.jar
org.springframework.context-3.0.6.RELEASE.jar
org.springframework.core-3.0.6.RELEASE.jar
org.springframework.expression-3.0.6.RELEASE.jar
org.springframework.jdbc-3.0.6.RELEASE.jar
org.springframework.orm-3.0.6.RELEASE.jar
org.springframework.transaction-3.0.6.RELEASE.jar
org.springframework.web-3.0.6.RELEASE.jar --------------------编程问答-------------------- 开始的准备工作要做足,jar,xml配置都要搞好的 --------------------编程问答--------------------
引用 2 楼 LadyShao 的回复:
你在web.xml里配置了过滤器吗?

配置了 --------------------编程问答--------------------
引用 4 楼 vtopqx 的回复:
看问题:
Unable to load configuration. - bean - jar:file:/C:/Users/DELL/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/HelloStruts/WEB-INF/lib/struts2-gxp-plugin-2.……
这个是说struts.xml配置错了吗?
补充:Java ,  Web 开发
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,