`
iceglove
  • 浏览: 16777 次
  • 性别: Icon_minigender_1
  • 来自: 福州
社区版块
存档分类
最新评论

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

阅读更多

Struts2报错信息:

 Exception starting filter struts2
Unable to load bean: type:com.opensymphony.xwork2.ObjectFactory class:org.apache.struts2.spring.StrutsSpringObjectFactory - bean - jar:file:/D:/soft/apache-tomcat-5.5.26/webapps/test2/WEB-INF/lib/struts2-spring-plugin-2.0.14.jar!/struts-plugin.xml:30:132
 at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:208)
 at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:101)
 at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:131)
 at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
 at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:395)
 at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452)
 at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:205)
 at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:221)
 at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:302)
 at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:78)
 at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3635)
 at org.apache.catalina.core.StandardContext.start(StandardContext.java:4222)
 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
 at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:926)
 at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:889)
 at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
 at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
 at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
 at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
 at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
 at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
 at org.apache.catalina.core.StandardService.start(StandardService.java:448)
 at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Caused by: java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContextAware
 at java.lang.ClassLoader.defineClass1(Native Method)
 at java.lang.ClassLoader.defineClass(Unknown Source)
 at java.security.SecureClassLoader.defineClass(Unknown Source)
 at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1853)
 at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:875)
 at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1330)
 at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1209)
 at java.lang.ClassLoader.loadClassInternal(Unknown Source)
 at java.lang.ClassLoader.defineClass1(Native Method)
 at java.lang.ClassLoader.defineClass(Unknown Source)
 at java.security.SecureClassLoader.defineClass(Unknown Source)
 at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1853)
 at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:875)
 at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1330)
 at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1209)
 at com.opensymphony.xwork2.util.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:139)
 at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:180)
 ... 33 more

 

解决办法:

加入Spring的jar包。

分享到:
评论
2 楼 iceglove 2012-05-10  
cancan7 写道
那个如果没用到spring也报这个错呢

那应该要把spring的配置去掉,我没碰到这种场景,具体百度一下
1 楼 cancan7 2012-04-09  
那个如果没用到spring也报这个错呢

相关推荐

    com.opensymphony.xwork2.DefaultActionProxy

    com.opensymphony.xwork2.DefaultActionProxy com.opensymphony.xwork2.DefaultActionInvocation org.apache.struts2.dispatcher.FilterDispatcher

    OpenSymphony公司的xwork资源包

    在XWork中,每个动作都是一个Java类,该类通常继承自`com.opensymphony.xwork2.ActionSupport`基类。开发者可以在这个类中定义处理用户请求的方法,并在XML配置文件中指定这些方法与URL请求的对应关系。这样,当用户...

    struts-2.1.6.chm

    com.opensymphony.xwork2 ...com.opensymphony.xwork2.spring Spring ObjectFactory classes. com.opensymphony.xwork2.spring.interceptor Spring specific interceptor classes. com.opensymphony.xwork2.test ...

    struts 2.3.4.1 最新英文版API

    struts 2.3.4.1 最新英文版...com.opensymphony.xwork2.spring Spring ObjectFactory classes. com.opensymphony.xwork2.spring.interceptor Spring specific interceptor classes. com.opensymphony.xwork2.test ...

    xwork-core-2.3.37.jar

    用于解决struts2升级至2.3.37时 出现java.lang.NoSuchMethodError: com.opensymphony.xwork2.ActionContext.put(Ljava/lang/异常时,更换的xwork-core-2.3.37.jar

    升级struts2.3.32 需要的jar:asm-3.3.jar,asm-commons-3.3,asm-tree-3.3.jar

    不然有以下报错java.lang.NoClassDefFoundError: com/opensymphony/xwork2/util/finder/ClassFinder$InfoBuildingVisitor,导入asm-3.3.jar,asm-commons-3.3,asm-tree-3.3.jar即可,压缩包里面有

    struts2下的Xwork2源文件

    struts2下的Xwork2源文件 在 opensymphony开源社区http://www.opensymphony.com/ 可匿名使用SVN checkout xwork2的源代码 http://svn.opensymphony.com/svn/xwork/trunk

    struts2驱动包

    log4j:WARN No appenders could be found for logger (com.opensymphony.xwork2.config.providers.XmlConfigurationProvider). log4j:WARN Please initialize the log4j system properly. 2009-8-29 14:02:46 org....

    stuts2.2_API文档

    API帮助文档 java.lang.Object com.opensymphony.xwork2.ActionContext (implements java.io.Serializable) ...org.apache.struts2.StrutsException (implements com.opensymphony.xwork2.util.location.Locatable)

    xwork-2.1.5-all.rar_xwork_xwork-2.1.5_xwork-2.1.5.jar_xwork-core

    XWork与Struts2紧密相关,Struts2是基于XWork构建的一个MVC框架,它在XWork的基础上增加了视图层的支持,提供了更全面的Web应用解决方案。 8. **应用场景**: XWork常用于企业级的Web应用开发,尤其适合那些需要...

    struts2-core-2.3.15.3.jar

    Apache Struts ... This product includes software developed by ...XWork (http://www.opensymphony.com/xwork/). XPP3 (http://www.extreme.indiana.edu/xgws/xsoap/xpp/). XStream (http://xstream.codehaus.org/).

    struts-2.1.8.1-src.zip

    Apache Struts ... This product includes software developed by ...XWork (http://www.opensymphony.com/xwork/). XPP3 (http://www.extreme.indiana.edu/xgws/xsoap/xpp/). XStream (http://xstream.codehaus.org/).

    struts-2.3.15.3-apps.zip

    Apache Struts ... This product includes software developed by ...XWork (http://www.opensymphony.com/xwork/). XPP3 (http://www.extreme.indiana.edu/xgws/xsoap/xpp/). XStream (http://xstream.codehaus.org/).

    struts-2.5.13-docs

    Apache Struts ... This product includes software developed by ...XWork (http://www.opensymphony.com/xwork/). XPP3 (http://www.extreme.indiana.edu/xgws/xsoap/xpp/). XStream (http://xstream.codehaus.org/).

    spring-framework-3.0.5.RELEASE-dependencies-2

    com.opensymphony.quartz com.oracle.toplink.essentials com.springsource.bundlor com.springsource.util com.sun.syndication com.thoughtworks.xstream 2号包: net.sourceforge.serp net.sourceforge.xslthl ...

    spring-framework-3.0.5.RELEASE-dependencies-5

    com.opensymphony.quartz com.oracle.toplink.essentials com.springsource.bundlor com.springsource.util com.sun.syndication com.thoughtworks.xstream 2号包: net.sourceforge.serp net.sourceforge.xslthl ...

    spring-framework-3.0.5.RELEASE-dependencies-1

    com.opensymphony.quartz com.oracle.toplink.essentials com.springsource.bundlor com.springsource.util com.sun.syndication com.thoughtworks.xstream 2号包: net.sourceforge.serp net.sourceforge.xslthl ...

    spring-framework-3.0.5.RELEASE-dependencies-6

    com.opensymphony.quartz com.oracle.toplink.essentials com.springsource.bundlor com.springsource.util com.sun.syndication com.thoughtworks.xstream 2号包: net.sourceforge.serp net.sourceforge.xslthl ...

    spring-framework-3.0.5.RELEASE-dependencies-3

    com.opensymphony.quartz com.oracle.toplink.essentials com.springsource.bundlor com.springsource.util com.sun.syndication com.thoughtworks.xstream 2号包: net.sourceforge.serp net.sourceforge.xslthl ...

    spring-framework-3.0.5.RELEASE-dependencies-8

    com.opensymphony.quartz com.oracle.toplink.essentials com.springsource.bundlor com.springsource.util com.sun.syndication com.thoughtworks.xstream 2号包: net.sourceforge.serp net.sourceforge.xslthl ...

Global site tag (gtag.js) - Google Analytics