收藏 求教高手:Unable to load configuration. - bean - jar:file:
[11:41:25.895] {main} Caused by: Unable to load configuration. - bean - jar:file:/E:/Workspace2/MSAdapter/WebRoot/WEB-INF/lib/struts2-core-2.1.8.1.jar!/struts-default.xml:29:72[11:41:25.895] {main} at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:431)
[11:41:25.895] {main} at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69)
[11:41:25.895] {main} at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)
[11:41:25.895] {main} at com.caucho.server.dispatch.FilterManager.createFilter(FilterManager.java:197)
[11:41:25.895] {main} ... 18 more
[11:41:25.895] {main} Caused by: Unable to load configuration. - bean - jar:file:/E:/Workspace2/MSAdapter/WebRoot/WEB-INF/lib/struts2-core-2.1.8.1.jar!/struts-default.xml:29:72
[11:41:25.895] {main} at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58)
[11:41:25.895] {main} at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:374)
[11:41:25.895] {main} at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:418)
[11:41:25.895] {main} ... 21 more
[11:41:25.895] {main} Caused by: Unable to load bean: type: class:com.opensymphony.xwork2.ObjectFactory - bean - jar:file:/E:/Workspace2/MSAdapter/WebRoot/WEB-INF/lib/struts2-core-2.1.8.1.jar!/struts-default.xml:29:72
[11:41:25.895] {main} at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:221)
[11:41:25.895] {main} at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:101)
[11:41:25.895] {main} at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:169)
[11:41:25.895] {main} at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55)
[11:41:25.895] {main} ... 23 more
[11:41:25.895] {main} Caused by: Bean type class com.opensymphony.xwork2.ObjectFactory with the name xwork has already been loaded by bean - jar:file:/E:/Workspace2/MSBP_Refactor/WebRoot/WEB-INF/lib/struts2-core-2.1.8.1.jar!/struts-default.xml:29:72 - bean - jar:file:/E:/Workspace2/MSAdapter/WebRoot/WEB-INF/lib/struts2-core-2.1.8.1.jar!/struts-default.xml:29:72
[11:41:25.895] {main} at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:205)
[11:41:25.895] {main} ... 26 more
怎么回事儿啊? file bean jar class --------------------编程问答-------------------- 大虾帮帮忙啊,在线等啊!!! --------------------编程问答-------------------- Caused by: Bean type class com.opensymphony.xwork2.ObjectFactory with the name xwork has already been loaded by bean - jar:file:/E:/Workspace2/MSBP_Refactor/WebRoot/WEB-INF/lib/struts2-core-2.1.8.1.jar!/struts-default.xml:29:72 - bean - jar:file:/E:/Workspace2/MSAdapter/WebRoot/WEB-INF/lib/struts2-core-2.1.8.1.jar!/struts-default.xml:29:72
明显是告诉你重复加载了 --------------------编程问答-------------------- jar包冲突了,看下jar包是否有重复的 --------------------编程问答--------------------
试了,把两个工程的包remove了下,MSBP_Refactor移除报错,MSBP_Refactor移除还是原来这个错误 --------------------编程问答--------------------
移除还是不行 --------------------编程问答-------------------- 应该是包冲突了。你可以这样,留struts2运行需要的最少的包试试看看吧。
补充:Java , Java EE