Unable to load configuration. - action - file:/D:/bianchenggggggggggggg/Tomcat/Tomcat%208/me-webapps

严重: Exception starting filter struts2_1
Unable to load configuration. - action - file:/D:/bianchenggggggggggggg/Tomcat/Tomcat%208/me-webapps/bookstore/WEB-INF/classes/struts.xml:10:64
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:428)
at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4659)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5281)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: Unable to load configuration. - action - file:/D:/bianchenggggggggggggg/Tomcat/Tomcat%208/me-webapps/bookstore/WEB-INF/classes/struts.xml:10:64
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:69)
at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:371)
at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:415)
... 14 more
Caused by: Action class [userAction] not found - action - file:/D:/bianchenggggggggggggg/Tomcat/Tomcat%208/me-webapps/bookstore/WEB-INF/classes/struts.xml:10:64
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.verifyAction(XmlConfigurationProvider.java:420)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:365)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:479)
at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:275)
at org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:111)
at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:204)
at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66)
... 16 more
二月 04, 2016 9:35:21 下午 org.apache.catalina.core.StandardContext startInternal
严重: One or more Filters failed to start. Full details will be found in the appropriate container log file
二月 04, 2016 9:35:21 下午 org.apache.catalina.core.StandardContext startInternal
严重: Context [/bookstore] startup failed due to previous errors
二月 04, 2016 9:35:21 下午 org.apache.catalina.core.ApplicationContext log
信息: Closing Spring root WebApplicationContext
二月 04, 2016 9:35:21 下午 org.apache.catalina.loader.WebappClassLoaderBase checkThreadLocalMapForLeaks
严重: The web application [bookstore] created a ThreadLocal with key of type [com.opensymphony.xwork2.inject.ContainerImpl$10] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@68ec4858]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@7081bf38]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
二月 04, 2016 9:35:21 下午 org.apache.catalina.loader.WebappClassLoaderBase checkThreadLocalMapForLeaks
严重: The web application [bookstore] created a ThreadLocal with key of type [com.opensymphony.xwork2.inject.ContainerImpl$10] (value [com.opensymphony.xwork2.inject.ContainerImpl$10@56312f3c]) and a value of type [java.lang.Object[]] (value [[Ljava.lang.Object;@37143859]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
二月 04, 2016 9:35:21 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:\bianchenggggggggggggg\Tomcat\Tomcat 8\webapps\docs
二月 04, 2016 9:35:21 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory D:\bianchenggggggggggggg\Tomcat\Tomcat 8\webapps\docs has finished in 32 ms
二月 04, 2016 9:35:21 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:\bianchenggggggggggggg\Tomcat\Tomcat 8\webapps\manager
二月 04, 2016 9:35:21 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory D:\bianchenggggggggggggg\Tomcat\Tomcat 8\webapps\manager has finished in 31 ms
二月 04, 2016 9:35:21 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:\bianchenggggggggggggg\Tomcat\Tomcat 8\webapps\ROOT
二月 04, 2016 9:35:21 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory D:\bianchenggggggggggggg\Tomcat\Tomcat 8\webapps\ROOT has finished in 32 ms
二月 04, 2016 9:35:21 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-nio-8080"]
二月 04, 2016 9:35:21 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-nio-8009"]
二月 04, 2016 9:35:21 下午 org.apache.catalina.startup.Catalina start

信息: Server startup in 5840 ms

原因是缺少jar包:struts2-spring-plugin-2.1.8.jar

        原先所struts创建的action类,交给了spring创建。在struts2-spring-plugin.jar中有一个struts-plugin.xml,里面声明了action类由spring工厂创建。在struts2插件文档里,这样写着“The Spring Plugin works by overriding the Struts ObjectFactory to enhance the creation of core framework objects”这个插件重写了struts的对象工厂,当创建一个action类时,它会根据struts的配置文件的class属性的值与spring配置文件中的id属性的值相匹配。如果没有与之相匹配,将会像没有使用这个插件前一样创建,然后由spring自动装配

方法源自:http://blog.csdn.net/zhaoxiao2008/article/details/7906381


你可能感兴趣的:(Unable to load configuration. - action - file:/D:/bianchenggggggggggggg/Tomcat/Tomcat%208/me-webapps)