Caused by: Unable to load bean: type:com.opensymphony.xwork2.ObjectFactory class:org.apache.struts2.

1、错误描述

严重: Dispatcher initialization failed
Unable to load configuration. - bean - jar:file:/home/youhaidong/workspaces/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/SSH/WEB-INF/lib/struts2-spring-plugin-2.3.24.1.jar!/struts-plugin.xml:29:132
	at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70)
	at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:967)
	at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:435)
	at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:479)
	at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
	at org.apache.struts2.dispatcher.ng.listener.StrutsListener.contextInitialized(StrutsListener.java:46)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5068)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5584)
	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.run(FutureTask.java:262)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)
Caused by: Unable to load bean: type:com.opensymphony.xwork2.ObjectFactory class:org.apache.struts2.spring.StrutsSpringObjectFactory - bean - jar:file:/home/youhaidong/workspaces/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/SSH/WEB-INF/lib/struts2-spring-plugin-2.3.24.1.jar!/struts-plugin.xml:29:132
	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)
	... 14 more
Caused by: java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContextAware
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:3118)
	at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:1340)
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1827)
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1701)
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:3118)
	at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:1340)
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1827)
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1701)
	at com.opensymphony.xwork2.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:144)
	at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:218)
	... 17 more
Caused by: java.lang.ClassNotFoundException: org.springframework.context.ApplicationContextAware
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1858)
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1701)
	... 33 more

三月 05, 2016 10:12:36 上午 org.apache.catalina.core.StandardContext listenerStart
严重: Exception sending context initialized event to listener instance of class org.apache.struts2.dispatcher.ng.listener.StrutsListener
Unable to load configuration. - bean - jar:file:/home/youhaidong/workspaces/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/SSH/WEB-INF/lib/struts2-spring-plugin-2.3.24.1.jar!/struts-plugin.xml:29:132
	at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:493)
	at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
	at org.apache.struts2.dispatcher.ng.listener.StrutsListener.contextInitialized(StrutsListener.java:46)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5068)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5584)
	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.run(FutureTask.java:262)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)
Caused by: Unable to load configuration. - bean - jar:file:/home/youhaidong/workspaces/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/SSH/WEB-INF/lib/struts2-spring-plugin-2.3.24.1.jar!/struts-plugin.xml:29:132
	at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70)
	at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:967)
	at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:435)
	at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:479)
	... 11 more
Caused by: Unable to load bean: type:com.opensymphony.xwork2.ObjectFactory class:org.apache.struts2.spring.StrutsSpringObjectFactory - bean - jar:file:/home/youhaidong/workspaces/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/SSH/WEB-INF/lib/struts2-spring-plugin-2.3.24.1.jar!/struts-plugin.xml:29:132
	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)
	... 14 more
Caused by: java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContextAware
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:3118)
	at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:1340)
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1827)
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1701)
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:3118)
	at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:1340)
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1827)
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1701)
	at com.opensymphony.xwork2.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:144)
	at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:218)
	... 17 more
Caused by: java.lang.ClassNotFoundException: org.springframework.context.ApplicationContextAware
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1858)
	at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1701)
	... 33 more

三月 05, 2016 10:12:36 上午 org.apache.catalina.core.StandardContext startInternal
严重: One or more listeners failed to start. Full details will be found in the appropriate container log file
三月 05, 2016 10:12:36 上午 org.apache.catalina.core.StandardContext startInternal
严重: Context [/SSH] startup failed due to previous errors
三月 05, 2016 10:12:36 上午 org.apache.catalina.core.StandardContext listenerStop
严重: Exception sending context destroyed event to listener instance of class org.apache.struts2.dispatcher.ng.listener.StrutsListener
java.lang.NullPointerException
	at org.apache.struts2.dispatcher.ng.listener.StrutsListener.contextDestroyed(StrutsListener.java:60)
	at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:5115)
	at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5779)
	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:224)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:159)
	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.run(FutureTask.java:262)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)

2、错误原因

在配置SSH框架时,导入了struts2-spring-plugin-2.3.24.1.jar,但是没有导入相关的spring jar

3、解决办法

下载spring framework,将其中的spring jar复制到lib目录下

时间: 2024-10-10 15:29:11

Caused by: Unable to load bean: type:com.opensymphony.xwork2.ObjectFactory class:org.apache.struts2.的相关文章

Caused by: Unable to load configuration. - action - file:/C:/apache-tomcat-7.0.70/webapps/Structs/WEB-INF/classes/struts.xml:7:72 at com.opensymphony.xwork2.config.ConfigurationManager.getConfigurati

Unable to load configuration. - action - file:/C:/apache-tomcat-7.0.70/webapps/Structs/WEB-INF/classes/struts.xml:7:72 at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:431) at org.apache.struts2.dispatcher.ng.InitOperations.initDispat

Caused by: java.lang.ClassNotFoundException: com.opensymphony.xwork2.util.classloader.ReloadingClassLoader

今天学习到strusts2与spring的整合,把原来可以交给spring产生的东西都扔给了它,终于拜托了繁琐的代码,只专心于逻辑开发就OK了,现在连strusts的action都可以交给spring容器产生了! 在strusts2和spring整合的时候,必不可少的一个jar包就是struts2-spring-plugin.jar,但是需要注意的是,如果jar包的版本冲突也会报异常的,今天本博就遇到了这样一个问题. Unable to load configuration. - bean -

Unable to load configuration. - bean - jar:file:../../ComputerScience/JavaEE/workspace/.metadata解决办法

在运行一个JavaEE的项目时,出现了如下的错误: unable to load configuration. - bean - jar:file:/../workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/WorkSystem/WEB-INF/lib/struts2-core-2.3.16.3.jar!/struts-default.xml:64:179 at org.apache.struts2.d

struts2 jar包导入Unable to load configuration. - bean问题 (404 源服务器未能找到目标资源的表示或者是不愿公开一个已经存在的资源表示。)

用eclipse配置好了struts2,一运行tomcat就报错,我这里原因是我吧struts2的jar包都放进去了,太多了所以报错,然后我去掉了大部分留下几个核心jar包,还是报错, java.lang.NoClassDefFoundError: com/opensymphony/xwork2/ActionContext at org.apache.struts2.dispatcher.ng.InitOperations.cleanup(InitOperations.java:114) at

Caused by: Unable to locate parent package [json-default] for [class com.you.user.action.StudentActi

1.错误描述 信息: Choosing bean (struts) for (com.opensymphony.xwork2.util.TextParser) 2014-7-13 1:52:04 org.apache.struts2.spring.StrutsSpringObjectFactory info 信息: Initializing Struts-Spring integration... 2014-7-13 1:52:04 com.opensymphony.xwork2.spring.

Caused by: Unable to locate parent package [json-package] for [class com.you.action.ColumnAction] -

1.错误描述 三月 15, 2015 7:53:25 下午 com.opensymphony.xwork2.util.logging.jdk.JdkLogger error 严重: Dispatcher initialization failed Unable to load configuration. - [unknown location] at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(Con

启动tomcat后struts框架报异常严重: Exception starting filter struts2 Unable to load configuration. - Class: java.net.PlainSocketImpl

今天刚好宿舍断网,打开电脑,打开ide工具,启动tomcat后,访问web项目工程,页面显示404,查看控制台,运行报错信息如下: 严重: Exception starting filter struts2Unable to load configuration. - Class: java.net.PlainSocketImplFile: PlainSocketImpl.javaMethod: connectLine: 177 - java/net/PlainSocketImpl.java:1

Unable to load configuration. - Class: java.net.AbstractPlainSocketImpl

[Bug笔记]Unable to load configuration. - Class: java.net.AbstractPlainSocketImpl 标签: bugjartomcat服务器互联网 2014-04-29 10:44 1491人阅读 评论(0) 收藏 举报 分类: Bug笔记(8) 版权声明:本文为博主原创文章,未经博主允许不得转载. 最近出了一件怪事,在联网状态下启动Tomcat和没有联网状态下启动Tomcat会出现两种不同的结果:正常启动和报错 于是自己纠结了半天,查找原

Unable to load configuration. - action - file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%209.0/webapps/Teacher04/WEB-INF/classes/struts.xml:9:54

发布一个struts2项目的时候tomcat显示下面这个错误,我的本能感觉就是我的struts.xml或者web.xml写错了,可是我字母找都没发现,于是百度一番,可是我对那些人的回答表示怀疑,感觉应该不行,直到我一直找下去,发现一个不起眼的回答说出了我需要的回答 我回来一看,发现我的错误里的确有这个struts.xml:9:54,于是看一下我的struts.xml,我要哭了 严重: Exception starting filter struts2 Unable to load configu