日期:2014-05-20  浏览次数:20970 次

报错Cannot locate the chosen ObjectFactory implementation: spring 但我已添加struts2-spring-plugin包,求助
报错
ERROR [org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/]] - Exception starting filter struts2
Cannot locate the chosen ObjectFactory implementation: spring - [unknown location]
at org.apache.struts2.config.BeanSelectionProvider.alias(BeanSelectionProvider.java:224)
at org.apache.struts2.config.BeanSelectionProvider.alias(BeanSelectionProvider.java:195)
at org.apache.struts2.config.BeanSelectionProvider.register(BeanSelectionProvider.java:153)
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:201)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:223)
at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:304)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:77)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3600)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4189)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
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:275)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

看到网上说原因是 
没有添加struts2-spring-plugin-XXXX.jar 

但是我早就已经添加了struts2-spring-plugin-2.0.11.1.jar包
请帮忙,急. 谢谢了.


------解决方案--------------------
会不会是你的配置文件没配置好的原因;
仔细检查下
------解决方案--------------------
没遇见过这问题,应该是配置不对/