调度程序初始化失败.java.lang.ClassNotFoundException: org.apache.struts2.views.gxp.inject.InjectedObjectContainer

2022-01-16 00:00:00 java struts2 xml-configuration gxp

我正在使用 Struts 2.3.14.2 jar,但是当我创建简单的应用程序时,我收到以下错误/异常.我几乎把所有事情都做得很完美.我在类路径中添加了几乎所有的 jar.但仍然出现此异常.

I'm using Struts 2.3.14.2 jars, but when I created the simple application, I'm getting the following error/exception. I almost did everything perfectly. I added almost all jars in the class path. But still getting this exception.

我错过了什么吗?

SEVERE: Dispatcher initialization failed
Unable to load configuration. - bean - jar:file:/C:/Users/Nisha/Downloads/ecplise/util/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/StrutsUtil/WEB-INF/lib/struts2-gxp-plugin-2.3.14.2.jar!/struts-plugin.xml:8:162
    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70)
    at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:429)
    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:473)
    at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:193)
    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:4624)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5281)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1525)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1515)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(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:org.apache.struts2.views.gxp.inject.InjectedObjectContainer class:org.apache.struts2.views.gxp.inject.InjectedObjectContainer - bean - jar:file:/C:/Users/Nisha/Downloads/ecplise/util/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/StrutsUtil/WEB-INF/lib/struts2-gxp-plugin-2.3.14.2.jar!/struts-plugin.xml:8:162
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:245)
    at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:102)
    at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:226)
    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
    ... 17 more
Caused by: java.lang.ClassNotFoundException: org.apache.struts2.views.gxp.inject.InjectedObjectContainer
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1688)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1533)
    at com.opensymphony.xwork2.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:152)
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:216)
    ... 20 more
2 Jun, 2013 5:40:11 PM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter struts3
Unable to load configuration. - bean - jar:file:/C:/Users/Nisha/Downloads/ecplise/util/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/StrutsUtil/WEB-INF/lib/struts2-gxp-plugin-2.3.14.2.jar!/struts-plugin.xml:8:162
    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:485)
    at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:193)
    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:4624)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5281)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1525)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1515)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(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 - jar:file:/C:/Users/Nisha/Downloads/ecplise/util/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/StrutsUtil/WEB-INF/lib/struts2-gxp-plugin-2.3.14.2.jar!/struts-plugin.xml:8:162
    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70)
    at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:429)
    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:473)
    ... 15 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/Nisha/Downloads/ecplise/util/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/StrutsUtil/WEB-INF/lib/struts2-gxp-plugin-2.3.14.2.jar!/struts-plugin.xml:8:162
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:245)
    at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:102)
    at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:226)
    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
    ... 17 more
Caused by: java.lang.ClassNotFoundException: org.apache.struts2.views.gxp.inject.InjectedObjectContainer
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1688)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1533)
    at com.opensymphony.xwork2.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:152)
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:216)
    ... 20 more
2 Jun, 2013 5:40:11 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Parsing configuration file [struts-default.xml]
2 Jun, 2013 5:40:12 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger info
INFO: Parsing configuration file [struts-plugin.xml]
2 Jun, 2013 5:40:12 PM com.opensymphony.xwork2.util.logging.commons.CommonsLogger error
SEVERE: Dispatcher initialization failed
Unable to load configuration. - bean - jar:file:/C:/Users/Nisha/Downloads/ecplise/util/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/StrutsUtil/WEB-INF/lib/struts2-gxp-plugin-2.3.14.2.jar!/struts-plugin.xml:8:162
    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70)
    at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:429)
    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:473)
    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:4624)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5281)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1525)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1515)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(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:org.apache.struts2.views.gxp.inject.InjectedObjectContainer class:org.apache.struts2.views.gxp.inject.InjectedObjectContainer - bean - jar:file:/C:/Users/Nisha/Downloads/ecplise/util/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/StrutsUtil/WEB-INF/lib/struts2-gxp-plugin-2.3.14.2.jar!/struts-plugin.xml:8:162
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:245)
    at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:102)
    at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:226)
    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
    ... 18 more
Caused by: java.lang.ClassNotFoundException: org.apache.struts2.views.gxp.inject.InjectedObjectContainer
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1688)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1533)
    at com.opensymphony.xwork2.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:152)
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:216)
    ... 21 more
2 Jun, 2013 5:40:12 PM org.apache.catalina.core.StandardContext filterStart
SEVERE: Exception starting filter struts2
Unable to load configuration. - bean - jar:file:/C:/Users/Nisha/Downloads/ecplise/util/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/StrutsUtil/WEB-INF/lib/struts2-gxp-plugin-2.3.14.2.jar!/struts-plugin.xml:8:162
    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:485)
    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:4624)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5281)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1525)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1515)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(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 - jar:file:/C:/Users/Nisha/Downloads/ecplise/util/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/StrutsUtil/WEB-INF/lib/struts2-gxp-plugin-2.3.14.2.jar!/struts-plugin.xml:8:162
    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70)
    at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:429)
    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:473)
    ... 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/Nisha/Downloads/ecplise/util/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/StrutsUtil/WEB-INF/lib/struts2-gxp-plugin-2.3.14.2.jar!/struts-plugin.xml:8:162
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:245)
    at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:102)
    at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:226)
    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
    ... 18 more
Caused by: java.lang.ClassNotFoundException: org.apache.struts2.views.gxp.inject.InjectedObjectContainer
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1688)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1533)
    at com.opensymphony.xwork2.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:152)
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:216)
    ... 21 more
2 Jun, 2013 5:40:12 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error filterStart
2 Jun, 2013 5:40:12 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/StrutsUtil] startup failed due to previous errors
2 Jun, 2013 5:40:12 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8089"]
2 Jun, 2013 5:40:12 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8099"]
2 Jun, 2013 5:40:12 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3171 ms

推荐答案

如果您没有使用 GXP 插件,请将其从类路径中删除.引用的类是 org.apache.struts2.views.gxp.inject.InjectedObjectContainer 在分发中不存在.但如果需要,您可以从 SVN 存储库下载它.

If you are not using GXP plugin, then remove it from classpath. The referenced class is org.apache.struts2.views.gxp.inject.InjectedObjectContainer absent in the distribution. But you could download it from the SVN repositories if required.

相关文章