Server Tomcat v7.0 Server at localhost failed to start

嚴重: Error starting static Resources
java.lang.IllegalArgumentException: Document base C:\Users\wuxingang\workspace_new\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\jeewx-oschina does not exist or is not a readable directory
at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:136)
at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:5326)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5517)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1707)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1697)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)java

解決方法:web

一、簡單粗暴的方法,在標籤Servers頁面,刪除tomcat,而後再添加Tomcat就行了。apache

二、通常罪魁禍首就是server.xml的Context標籤,你能夠先移除Context標籤的內容,再次啓動tomcat,實在不能解決辦法就是刪(慎重操做,記得備份、備份、備份、eclipse對於tomcat配置文件)tomcat

三、Tomcat的配置文件目錄下的「server.xml」文件。我以前解決重複加載的問題,將「<Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true">」的webapps改爲了其它目錄,而在Eclipse中向TomcatServer中添加的項目仍是會發布到webapps下,因此在啓動的時候就會出現Document base C:\tomcat7054\webroot\xinghe-web does not exist or is not a readable directory的錯誤。要解決這個問題將其改爲「webapps」就行了。
【appBase:這個目錄下面的子目錄將自動被部署爲應用,且war文件將被自動解壓縮並部署爲應用,默認爲tomcat下webapps目錄,若是不想訪問默認ROOT目錄,修改這裏,同理若是想訪問配置目錄下應用爲默認應用,在此目錄下新增ROOT目錄文件夾。】app

四、apache-tomcat-6.0.26\conf\Catalina\localhost下的manager.xml刪掉eclipse

相關文章
相關標籤/搜索