`

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

阅读更多

今天,tomcat服务器启动时,报严重错误:

2011-4-17 21:41:28 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter struts2
Unable to load bean: type: class:com.opensymphony.xwork2.ObjectFactory - bean - jar:file:/E:/apache-tomcat-6.0.24/apache-tomcat-6.0.24/webapps/shundewater/WEB-INF/lib/struts2-core-2.0.6.jar!/struts-default.xml:8:69
 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:295)
 at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:422)
 at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:115)
 at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3838)
 at org.apache.catalina.core.StandardContext.start(StandardContext.java:4488)
 at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
 at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1041)
 at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:964)
 at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
 at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
 at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
 at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
 at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
 at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
 at org.apache.catalina.core.StandardService.start(StandardService.java:516)
 at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:593)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: Bean type class com.opensymphony.xwork2.ObjectFactory with the name xwork has already been loaded by bean - jar:file:/E:/apache-tomcat-6.0.24/apache-tomcat-6.0.24/webapps/shundewater/WEB-INF/lib/struts2-core-2.0.14.jar!/struts-default.xml:30:72 - bean - jar:file:/E:/apache-tomcat-6.0.24/apache-tomcat-6.0.24/webapps/shundewater/WEB-INF/lib/struts2-core-2.0.6.jar!/struts-default.xml:8:69
 at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:193)
 ... 33 more
2011-4-17 21:41:28 org.apache.catalina.core.StandardContext start
严重: Error filterStart
2011-4-17 21:41:28 org.apache.catalina.core.StandardContext start
严重: Context [/shundewater] startup failed due to previous errors

 

解决办法:去web-inf下的lib下看是否存在相同的jar包,我的就是有相同的jar包,但是版本号不一样。找到了两个相同的jar包后,就删掉一个jar包,重新启动tomcat。

分享到:
评论

相关推荐

    com.opensymphony.xwork2.DefaultActionProxy

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

    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 ...

    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

    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 ...

    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/).

    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/).

    xwork-core-2.3.8

    取代xwork-2.x.x,解决java.lang.ClassNotFoundException: com.opensymphony.xwork2.config.FileManager问题

    OpenSymphony公司的xwork资源包

    OpenSymphony公司旗下的一款xwork资源包,开发java项目不可缺少的东西!!!

    java 请求的方法不存在(NoSuchMethodException)

    java 请求的方法不存在(NoSuchMethodException) java 请求的方法不存在(NoSuchMethodException)

    struts2 依赖核心包 --xwork 源文件

    struts2 依赖核心包 --xwork 源文件

    stuts2.2_API文档

    com.opensymphony.xwork2.XWorkException (implements com.opensymphony.xwork2.util.location.Locatable) org.apache.struts2.StrutsException (implements com.opensymphony.xwork2.util.location.Locatable)

    struts2-junit-plugin-2.1.8.jar

    可解决java.lang.NoSuchMethodError: com.opensymphony.xwork2.ActionContext.get(Ljava/lang/Object;)Ljava/lang/Object; java.lang.ClassNotFoundException: com.opensymphony.xwork2.util.TextUtils struts2.1.8...

    Struts课堂笔记.rar--struts2的struts.properties配置文件详解

    The com.opensymphony.xwork2.ObjectFactory implementation class com.opensymphony.xwork2.ObjectFactory接口(spring) struts.objectFactory.spring.autoWire Whether Spring should autoWire or not 是否...

    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-1

    2号包: net.sourceforge.serp net.sourceforge.xslthl org.antlr org.aopalliance javax.activation javax.annotation javax.ejb javax.el javax.faces javax.inject javax.jdo javax.jms javax.mail javax....

    最新的xwork-core-2.3.7.jar

    * or "XWork", nor may "OpenSymphony" or "XWork" appear in their * name, without prior written permission of the OpenSymphony Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR ...

    java程序包

    Java程序包,Java是一门面向对象编程语言,不仅吸收了C++语言的各种优点,还摒弃了C++里难以理解的多继承、指针等概念,因此Java语言具有功能强大和简单易用两个特征。Java语言作为静态面向对象编程语言的代表,极好...

    oscache缓存技术应用

    描述了oscahce在JAVA开发中的应用和配置说明

    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....

Global site tag (gtag.js) - Google Analytics