Dispatcher initialization failed解决办法

 

严重: Dispatcher initialization failed

Unable to load configuration. - action - file:/D:/Program%20Files/apache-tomcat-7.0.8/webapps/login/WEB-INF/classes/struts.xml:5:51

at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58)

at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:374)

at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:418)

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:273)

at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:254)

at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:372)

at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:98)

at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4461)

at org.apache.catalina.core.StandardContext$2.call(StandardContext.java:5133)

at org.apache.catalina.core.StandardContext$2.call(StandardContext.java:5128)

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:619)

Caused by: Error building results for action Login in namespace  - action - file:/D:/Program%20Files/apache-tomcat-7.0.8/webapps/login/WEB-INF/classes/struts.xml:5:51

at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:367)

at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:468)

at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:264)

at org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:111)

at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:193)

at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55)

... 16 more

Caused by: No result type specified for result named 'success', perhaps the parent package does not specify the result type? - result - file:/D:/Program%20Files/apache-tomcat-7.0.8/webapps/login/WEB-INF/classes/struts.xml:6:27

at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.buildResults(XmlConfigurationProvider.java:612)

at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:365)

... 21 more

2011-3-14 9:59:57 org.apache.catalina.core.StandardContext filterStart

严重: Exception starting filter struts2

Unable to load configuration. - action - file:/D:/Program%20Files/apache-tomcat-7.0.8/webapps/login/WEB-INF/classes/struts.xml:5:51

at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:431)

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:273)

at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:254)

at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:372)

at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:98)

at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4461)

at org.apache.catalina.core.StandardContext$2.call(StandardContext.java:5133)

at org.apache.catalina.core.StandardContext$2.call(StandardContext.java:5128)

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:619)

Caused by: Unable to load configuration. - action - file:/D:/Program%20Files/apache-tomcat-7.0.8/webapps/login/WEB-INF/classes/struts.xml:5:51

at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:58)

at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:374)

at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:418)

... 14 more

Caused by: Error building results for action Login in namespace  - action - file:/D:/Program%20Files/apache-tomcat-7.0.8/webapps/login/WEB-INF/classes/struts.xml:5:51

at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:367)

at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:468)

at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:264)

at org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:111)

at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:193)

at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:55)

... 16 more

Caused by: No result type specified for result named 'success', perhaps the parent package does not specify the result type? - result - file:/D:/Program%20Files/apache-tomcat-7.0.8/webapps/login/WEB-INF/classes/struts.xml:6:27

at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.buildResults(XmlConfigurationProvider.java:612)

at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:365)

... 21 more

2011-3-14 9:59:57 org.apache.catalina.core.StandardContext startInternal

严重: Error filterStart

2011-3-14 9:59:57 org.apache.catalina.core.StandardContext startInternal

严重: Context [/login] startup failed due to previous errors

2011-3-14 9:59:57 org.apache.catalina.startup.HostConfig deployDirectory


 

 

解决办法:在struts.xml的package标签中加入extends="struts-default"属性。或者在可视化界面下

点击Add,选择struts-default。

你可能感兴趣的:(J2EE,initialization,action,file,exception,login)