struts2出错

Caused by: Unable to load configuration. - bean - jar:file:/F:/Workspaces/MyEclipse%208.x/.metadata/.me_tcat/webapps/test04/WEB-INF/lib/struts2-core-2.2.1.1.jar!/struts-default.xml:29:72
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:69)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:374)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:418)
... 29 more
Caused by: Unable to load bean: type: class:com.opensymphony.xwork2.ObjectFactory - bean - jar:file:/F:/Workspaces/MyEclipse%208.x/.metadata/.me_tcat/webapps/test04/WEB-INF/lib/struts2-core-2.2.1.1.jar!/struts-default.xml:29:72
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:232)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:101)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:180)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66)
... 31 more
Caused by: Bean type class com.opensymphony.xwork2.ObjectFactory with the name xwork has already been loaded by bean - jar:file:/F:/Workspaces/MyEclipse%208.x/.metadata/.me_tcat/webapps/test04/WEB-INF/lib/struts2-core-2.1.8.jar!/struts-default.xml:29:72 - bean - jar:file:/F:/Workspaces/MyEclipse%208.x/.metadata/.me_tcat/webapps/test04/WEB-INF/lib/struts2-core-2.2.1.1.jar!/struts-default.xml:29:72
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:216)
... 34 more
我删掉也不行,这个struts2-core-2.1.8是myeclipse里自带的,我重建了工程没有这种错了

Bean type class com.opensymphony.xwork2.ObjectFactory with the name xwork has already been loaded by bean - jar:file:/F:/Workspaces/MyEclipse%
208.x/.metadata/.me_tcat/webapps/test04/WEB-INF/lib/struts2-core-2.1.8.jar!/struts-default.xml:29:72 - bean - jar:file:/F:/Workspaces/MyEclipse%208.x/.metadata/.me_tcat/webapps/test04/WEB-INF/lib/struts2-core-2.2.1.1.jar!/struts-default.xml:29:72
包冲突了吧,环境变量中删掉一个struts包(struts2-core-2.1.8.jar,struts2-core-2.2.1.1.jar)其中之一,记得找到tomcat根目录里面WEB-INF/lib下也删一下,再重启
温馨提示:答案为网友推荐,仅供参考
第1个回答  2011-04-17
jar的冲突,struts2-core-2.1.6.jar 去网上下一个这个就可以了。把那两个都删了。