at com.opensymphony.xwork2.util.FileManager$FileRevision.needsReloading(FileMana

启动tomcat时就报如下错误: 

严重: Exception starting filter struts2

java.lang.NullPointerException

atcom.opensymphony.xwork2.util.FileManager$FileRevision.needsReloading(FileManager.java:209)

atcom.opensymphony.xwork2.util.FileManager.fileNeedsReloading(FileManager.java:60)

atcom.opensymphony.xwork2.config.providers.XmlConfigurationProvider.needsReload(XmlConfigurationProvider.java:325)

atorg.apache.struts2.config.StrutsXmlConfigurationProvider.needsReload(StrutsXmlConfigurationProvider.java:168)

atcom.opensymphony.xwork2.config.ConfigurationManager.conditionalReload(ConfigurationManager.java:220)

atcom.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:61)

atorg.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:774)

atorg.apache.struts2.dispatcher.ng.InitOperations.initStaticContentLoader(InitOperations.java:77)

atorg.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:49)

atorg.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:275)

atorg.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397)

atorg.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)

atorg.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3693)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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)

2011-7-2220:52:07org.apache.catalina.core.StandardContextstart

严重:ErrorfilterStart

2011-7-2220:52:07org.apache.catalina.core.StandardContextstart

严重:Context[/Struts_001]startupfailedduetopreviouserrors

LifeServlet>init():Servlet被初始化了1次

2011-7-22 20:52:11 org.apache.coyote.http11.Http11Protocol start

此问题的原因是:配置文件的问题,看看web.xml和struts.xml

尤其是注意struts.xml(上次出现问题是由于struts.xml的问题)

相关推荐