当前位置: 代码迷 >> Java Web开发 >> struts2.3.4.1启动抛错误 Unable to load configuration
  详细解决方案

struts2.3.4.1启动抛错误 Unable to load configuration

热度:4764   发布时间:2013-02-25 21:09:30.0
struts2.3.4.1启动抛异常 Unable to load configuration
Java code
信息: Unable to locate configuration files of the name struts-plugin.xml, skipping2012-10-23 7:12:52 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info信息: Parsing configuration file [struts-plugin.xml]2012-10-23 7:12:52 com.opensymphony.xwork2.util.logging.commons.CommonsLogger error严重: Dispatcher initialization failedUnable to load configuration. - Class: com.opensymphony.xwork2.util.fs.DefaultFileManagerFile: DefaultFileManager.javaMethod: openFileLine: 88 - com/opensymphony/xwork2/util/fs/DefaultFileManager.java:88:-1    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:69)    at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:390)    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:437)    at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)    at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)    at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:277)    at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258)    at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:382)    at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:103)    at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4650)    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5306)    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)    at java.util.concurrent.FutureTask.run(FutureTask.java:138)    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)    at java.lang.Thread.run(Thread.java:662)Caused by: Caught exception while loading file struts.xml - Class: com.opensymphony.xwork2.util.fs.DefaultFileManagerFile: DefaultFileManager.javaMethod: openFileLine: 88 - com/opensymphony/xwork2/util/fs/DefaultFileManager.java:88:-1    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:958)    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:163)    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:130)    at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:209)    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66)    ... 18 moreCaused by: java.lang.IllegalArgumentException: No file 'file:/G:/work/eclipse_workteam/workspace_juno/s2/WebContent/WEB-INF/classes/struts.xml' found as a resource    at com.opensymphony.xwork2.util.fs.DefaultFileManager.openFile(DefaultFileManager.java:88)    at com.opensymphony.xwork2.util.fs.DefaultFileManager.loadFile(DefaultFileManager.java:75)    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:943)    ... 22 more2012-10-23 7:12:52 org.apache.catalina.core.StandardContext filterStart严重: Exception starting filter struts2Unable to load configuration. - Class: com.opensymphony.xwork2.util.fs.DefaultFileManagerFile: DefaultFileManager.javaMethod: openFileLine: 88 - com/opensymphony/xwork2/util/fs/DefaultFileManager.java:88:-1    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:450)    at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)    at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)    at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:277)    at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258)    at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:382)    at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:103)    at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4650)    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5306)    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)    at java.util.concurrent.FutureTask.run(FutureTask.java:138)    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)    at java.lang.Thread.run(Thread.java:662)Caused by: Unable to load configuration. - Class: com.opensymphony.xwork2.util.fs.DefaultFileManagerFile: DefaultFileManager.javaMethod: openFileLine: 88 - com/opensymphony/xwork2/util/fs/DefaultFileManager.java:88:-1    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:69)    at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:390)    at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:437)    ... 16 moreCaused by: Caught exception while loading file struts.xml - Class: com.opensymphony.xwork2.util.fs.DefaultFileManagerFile: DefaultFileManager.javaMethod: openFileLine: 88 - com/opensymphony/xwork2/util/fs/DefaultFileManager.java:88:-1    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:958)    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadDocuments(XmlConfigurationProvider.java:163)    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:130)    at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:209)    at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66)    ... 18 moreCaused by: java.lang.IllegalArgumentException: No file 'file:/G:/work/eclipse_workteam/workspace_juno/s2/WebContent/WEB-INF/classes/struts.xml' found as a resource    at com.opensymphony.xwork2.util.fs.DefaultFileManager.openFile(DefaultFileManager.java:88)    at com.opensymphony.xwork2.util.fs.DefaultFileManager.loadFile(DefaultFileManager.java:75)    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadConfigurationFiles(XmlConfigurationProvider.java:943)    ... 22 more2012-10-23 7:12:52 org.apache.catalina.core.StandardContext startInternal严重: Error filterStart2012-10-23 7:12:52 org.apache.catalina.core.StandardContext startInternal严重: Context [/s2] startup failed due to previous errors2012-10-23 7:12:52 org.apache.catalina.startup.HostConfig deployDirectory信息: Deploying web application directory G:\work\eclipse_workteam\apache-tomcat-7.0.29\webapps\docs2012-10-23 7:12:52 org.apache.catalina.startup.HostConfig deployDirectory信息: Deploying web application directory G:\work\eclipse_workteam\apache-tomcat-7.0.29\webapps\examples2012-10-23 7:12:53 org.apache.catalina.core.ApplicationContext log信息: ContextListener: contextInitialized()2012-10-23 7:12:53 org.apache.catalina.core.ApplicationContext log信息: SessionListener: contextInitialized()2012-10-23 7:12:53 org.apache.catalina.core.ApplicationContext log信息: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@8b1a4f')2012-10-23 7:12:53 org.apache.catalina.startup.HostConfig deployDirectory信息: Deploying web application directory G:\work\eclipse_workteam\apache-tomcat-7.0.29\webapps\host-manager2012-10-23 7:12:53 org.apache.catalina.startup.HostConfig deployDirectory信息: Deploying web application directory G:\work\eclipse_workteam\apache-tomcat-7.0.29\webapps\manager2012-10-23 7:12:53 org.apache.catalina.startup.HostConfig deployDirectory信息: Deploying web application directory G:\work\eclipse_workteam\apache-tomcat-7.0.29\webapps\ROOT2012-10-23 7:12:53 org.apache.coyote.AbstractProtocol start信息: Starting ProtocolHandler ["http-bio-8080"]2012-10-23 7:12:53 org.apache.coyote.AbstractProtocol start信息: Starting ProtocolHandler ["ajp-bio-8009"]2012-10-23 7:12:53 org.apache.catalina.startup.Catalina start信息: Server startup in 1786 ms
  相关解决方案