Eclipse里Tomcat报错:Document base ……does not exist or is not a readable directory

时间:2024-03-24 10:40:49

问题描述:

Eclipse里Tomcat报错:Document base ……does not exist or is not a readable directory

    严重: Error starting static Resources
java.lang.IllegalArgumentException: Document base D:\Code\MyJavaCode\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\newsInfoCrawler does not exist or is not a readable directory

 

 

 

解决办法:

需要执行下面操作:

  步骤一:首先,进入,你的工作区间目录下的.metadata\.plugins\org.eclipse.wst.server.core/下

比如,我的这里是

Eclipse里Tomcat报错:Document base ……does not exist or is not a readable directory

 

 

  步骤二:进入tmp0/conf/目录,删除无用的 tmp0\conf\server.xml 中的  <Context>  节点; 

Eclipse里Tomcat报错:Document base ……does not exist or is not a readable directory

Eclipse里Tomcat报错:Document base ……does not exist or is not a readable directory

<Context docBase="D:\Code\MyJavaCode\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\ROOT" path="" reloadable="false"/>

<Context docBase="D:\Code\MyJavaCode\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\newsInfoCrawler" path="/newsInfoCrawler" reloadable="true" source="org.eclipse.jst.jee.server:newsInfoCrawler"/></Host>

 

删除,留下,得到

<Context docBase="D:\Code\MyJavaCode\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\ROOT" path="" reloadable="false"/></Host>

Eclipse里Tomcat报错:Document base ……does not exist or is not a readable directory

 

 

 

 

  步骤三:删除 tmp0\work\Catalina\localhost 下的所有文件夹;

我这里是,D:\Code\MyJavaCode\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\work\Catalina\localhost

 Eclipse里Tomcat报错:Document base ……does not exist or is not a readable directory

 

 

 

 

  步骤四:删除tomcat

Eclipse里Tomcat报错:Document base ……does not exist or is not a readable directory

Eclipse里Tomcat报错:Document base ……does not exist or is not a readable directory

 

 

 

  步骤五:重新配置tomcat

Eclipse里Tomcat报错:Document base ……does not exist or is not a readable directory

Eclipse里Tomcat报错:Document base ……does not exist or is not a readable directory

Eclipse里Tomcat报错:Document base ……does not exist or is not a readable directory

Eclipse里Tomcat报错:Document base ……does not exist or is not a readable directory



本文转自大数据躺过的坑博客园博客,原文链接:http://www.cnblogs.com/zlslch/p/6428114.html,如需转载请自行联系原作者