tomcat启动后台异常Error starting static Resources分析
严重: Error starting static Resources java.lang.IllegalArgumentException: Document base F:\tomact\apache-tomcat-6.0.36\webapps\shop does not exist or is not a readable directory at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:142) at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4320) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4489) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:675) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:601) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065) at org.apache.catalina.core.StandardHost.start(StandardHost.java:840) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463) at org.apache.catalina.core.StandardService.start(StandardService.java:525) at org.apache.catalina.core.StandardServer.start(StandardServer.java:754) at org.apache.catalina.startup.Catalina.start(Catalina.java:595) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414) 2013-12-20 2:17:32 org.apache.catalina.core.StandardContext start 严重: Error in resourceStart() |
异常原因分析: shop项目被手动从F:\tomact\apache-tomcat-6.0.36\webapps文件夹下删掉了。 启动tomcat就报上边的异常。 错误原因是没有删掉F:\tomact\apache-tomcat-6.0.36\conf\Catalina\localhost文件夹下的shop.xml文件。 说明:如果是通过remove deployment删除部署没有此问题。 |
问题解决方法: F:\tomact\apache-tomcat-6.0.36\conf\Catalina\localhost路径下还存在shop.xml的文件。删掉重启,异常消失。 |