2012-06-14 52 views
0

當我嘗試啓動tomcat 6時,在Catalina.log文件中出現以下異常。 我查找了類似的查詢,但找不到提及的解決方案。請注意,我在tomcat webapp中有我的應用程序,我沒有使用eclipse來運行它。catalina.log中的「SEVERE:啓動靜態資源時出錯」

Jun 14, 2012 12:33:45 PM org.apache.catalina.core.AprLifecycleListener init 
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: ............ 
Jun 14, 2012 12:33:45 PM org.apache.coyote.http11.Http11Protocol init 
INFO: Initializing Coyote HTTP/1.1 on http-9090 
Jun 14, 2012 12:33:45 PM org.apache.catalina.startup.Catalina load 
INFO: Initialization processed in 390 ms 
Jun 14, 2012 12:33:45 PM org.apache.catalina.core.StandardService start 
INFO: Starting service Catalina 
Jun 14, 2012 12:33:45 PM org.apache.catalina.core.StandardEngine start 
INFO: Starting Servlet Engine: Apache Tomcat/6.0.20 
Jun 14, 2012 12:33:45 PM org.apache.catalina.core.StandardContext resourcesStart 
SEVERE: Error starting static Resources 
java.lang.IllegalArgumentException: Document base C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\host-manager does not exist or is not a readable directory 
    at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:142) 
    at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4048) 
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4217) 
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) 
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) 
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526) 
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630) 
    at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:556) 
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:491) 
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206) 
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314) 
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) 
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) 
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:722) 
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) 
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) 
    at org.apache.catalina.core.StandardService.start(StandardService.java:516) 
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) 
    at org.apache.catalina.startup.Catalina.start(Catalina.java:583) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
    at java.lang.reflect.Method.invoke(Method.java:597) 
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) 
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) 
Jun 14, 2012 12:33:45 PM org.apache.catalina.core.StandardContext start 
SEVERE: Error in resourceStart() 
Jun 14, 2012 12:33:45 PM org.apache.catalina.core.StandardContext start 
SEVERE: Error getConfigured 
Jun 14, 2012 12:33:45 PM org.apache.catalina.core.StandardContext start 
SEVERE: Context [/host-manager] startup failed due to previous errors 
Jun 14, 2012 12:33:45 PM org.apache.catalina.core.StandardContext stop 
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager] has not been started 
Jun 14, 2012 12:33:45 PM org.apache.catalina.core.StandardContext resourcesStart 
SEVERE: Error starting static Resources 
java.lang.IllegalArgumentException: Document base C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\manager does not exist or is not a readable directory 
    at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:142) 
    at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4048) 
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4217) 
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791) 
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771) 
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526) 
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630) 
    at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:556) 
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:491) 
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206) 
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314) 
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) 
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053) 
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:722) 
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) 
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) 
    at org.apache.catalina.core.StandardService.start(StandardService.java:516) 
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) 
    at org.apache.catalina.startup.Catalina.start(Catalina.java:583) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
    at java.lang.reflect.Method.invoke(Method.java:597) 
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) 
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) 
Jun 14, 2012 12:33:45 PM org.apache.catalina.core.StandardContext start 
SEVERE: Error in resourceStart() 
Jun 14, 2012 12:33:45 PM org.apache.catalina.core.StandardContext start 
SEVERE: Error getConfigured 
Jun 14, 2012 12:33:45 PM org.apache.catalina.core.StandardContext start 
SEVERE: Context [/manager] startup failed due to previous errors 
Jun 14, 2012 12:33:45 PM org.apache.catalina.core.StandardContext stop 
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager] has not been started 
Jun 14, 2012 12:33:45 PM org.apache.catalina.loader.WebappClassLoader validateJarFile 
INFO: validateJarFile(C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\MyAPP\WEB-INF\lib\servlet.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class 
Jun 14, 2012 12:33:47 PM org.apache.coyote.http11.Http11Protocol start 
INFO: Starting Coyote HTTP/1.1 on http-9090 
Jun 14, 2012 12:33:47 PM org.apache.jk.common.ChannelSocket init 
INFO: JK: ajp13 listening on /0.0.0.0:9009 
Jun 14, 2012 12:33:47 PM org.apache.jk.server.JkMain start 
INFO: Jk running ID=0 time=0/16 config=null 
Jun 14, 2012 12:33:47 PM org.apache.catalina.startup.Catalina start 
INFO: Server startup in 2409 ms 

回答

0

建議:

1)確保Tomcat沒有無意中刪除您的.war。這可能是因爲一些有關的.war被「破」:

http://www.coderanch.com/t/479329/Tomcat/disappearing-war-file-tomcat

2)不要用空格使用的文件名。

您可以使用 「DIR/X」 從命令提示符看到DOS 「8.3」 的任何Windows目錄的名稱:

例:"c:\Program files"可能有 「短名」 "C:\PROGRA~1"

3)編輯您的描述符(包括app.xml)以替換8.3名稱中包含空格的任何內容。

4)除非您確定Tomcat本身是否正常(例如,默認的Tomcat頁面是否出現?),那麼您可能只想考慮刪除並重新安裝它。

'希望可以幫到