java.lang.IllegalArgumentException: Document base D:\apache-tomcat-7.0.40\webapps\day12 does not exist or is not a readable directory
at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:140)
at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:3814)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3985)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:608)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:535)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470)
at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1190)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:292)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1305)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1569)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1578)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1558)
at java.lang.Thread.run(Unknown Source)
原因:将webapps下的项目day12删除了,但是server.xml文件中的配置为删除,所以报上述错误。
解决办法:
将server.xml文件中的
<Context docBase="day12" path="/day12" reloadable="true" source="org.eclipse.jst.jee.server:day12"/>删除即可。