问题描述:
java.lang.IllegalArgumentException: Document base ……does not exist or is not a readable directory
解决办法:
在项目目录,选择要部署启动的项目右击,选择最后的properties选项

左侧点击project facets。

在右边勾选如图示的三项:Dynamic Web Module、Java、JavaScript。点击apply,再点apply and close

现在再去看tomcat,启动一下看看。

如果project facets已勾选,还不行的话,需要执行下面操作:

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

步骤二:进入tmp0/conf/目录,删除无用的 tmp0\conf\server.xml 中的 节点;
 java.lang.IllegalArgumentException: Document base ……does not exist or is not a readable directoryjava.lang.IllegalArgumentException: 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”/>
删除,留下,得到

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

java.lang.IllegalArgumentException: 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
 
 步骤四:删除tomcat
 java.lang.IllegalArgumentException: Document base ……does not exist or is not a readable directory
 步骤五:重新配置tomcat,重启即可
 java.lang.IllegalArgumentException: Document base ……does not exist or is not a readable directory

https://blog.csdn.net/anxin997483092/article/details/70880315

相关文章: