tomcat启动报Document base文件路径does not exist or is not a readable directory错误解决方案

java.lang.IllegalArgumentException: Document base D:\tools\apache-tomcat-7.0.42\webapps\tools\source\JavaEESource\shiro_test\src\main\webapp does not exist or is not a readable directory
	at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:138)
	at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:5055)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5235)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

开启tomcat出现如上所示问题,解决方法是:打开安装的tomcat路径下conf中的server.xml(D:\tools\apache-tomcat-7.0.42\conf这是我的路径),打开server.xml将注释掉,保存开启tomcat,运行成功就不会出现这个问题了


你可能感兴趣的:(tomcat)