struts启动报错的问题

今天配置struts1.3,在web.xml里加入配置文件出错,报错如下

严重: StandardWrapper.Throwable

java.lang.NullPointerException

atorg.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServlet.java:1003)

atorg.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:955)

atorg.apache.struts.action.ActionServlet.init(ActionServlet.java:470)

atjavax.servlet.GenericServlet.init(GenericServlet.java:212)

atorg.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)

atorg.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:993)

atorg.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4149)

atorg.apache.catalina.core.StandardContext.start(StandardContext.java:4458)

atorg.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)

atorg.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)

atorg.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)

atorg.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:987)

atorg.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:909)

atorg.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:495)

atorg.apache.catalina.startup.HostConfig.start(HostConfig.java:1206)

atorg.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)

atorg.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)

atorg.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)

atorg.apache.catalina.core.StandardHost.start(StandardHost.java:722)

atorg.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)

atorg.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)

atorg.apache.catalina.core.StandardService.start(StandardService.java:516)

atorg.apache.catalina.core.StandardServer.start(StandardServer.java:710)

atorg.apache.catalina.startup.Catalina.start(Catalina.java:583)

atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)

atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

atjava.lang.reflect.Method.invoke(Method.java:597)

atorg.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)

atorg.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

2010-4-23 17:15:46 org.apache.catalina.core.StandardContext loadOnStartup

百思不得其解,一个字符一个字符的比对,看有什么不同的。无解~~~

偶然之间,看到配置文件名struts-config-message .xml,后缀名前多了个空格,去掉空格,问题解决。

My God!What a fucking day!

相关推荐