Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SEVERE: Error starting static Resources in Tomcat server console

Tags:

tomcat

Long time back , i have deployed a DWR Webapp example , which i got from net . I ran into issues , and i deleted that war file from webapps , temp and from localhost folders but still i am getting these errrors under tomcat console while starting the server

INFO: Initialization processed in 795 ms
Mar 7, 2012 5:31:25 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Mar 7, 2012 5:31:25 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.33
Mar 7, 2012 5:31:25 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor DWR.xml
Mar 7, 2012 5:31:25 PM org.apache.catalina.core.StandardContext resourcesStart
SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Document base C:\Softwares\apache-tomcat-6.0.33\webapps\DWR 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:4320)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4489)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:675)
        at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:601)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
        at org.apache.catalina.core.StandardService.start(StandardService.java:525)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
        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:289)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Mar 7, 2012 5:31:25 PM org.apache.catalina.core.StandardContext start
SEVERE: Error in resourceStart()
Mar 7, 2012 5:31:25 PM org.apache.catalina.core.StandardContext start
SEVERE: Error getConfigured
Mar 7, 2012 5:31:25 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/DWR] startup failed due to previous errors
Mar 7, 2012 5:31:25 PM org.apache.catalina.core.StandardContext stop
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/DWR] has not been started
Mar 7, 2012 5:31:25 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor DWRExample.xml
Mar 7, 2012 5:31:25 PM org.apache.catalina.core.StandardContext resourcesStart
SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Document base C:\Softwares\apache-tomcat-6.0.33\webapps\DWRExample 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:4320)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4489)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)
        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:675)
        at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:601)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1317)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1065)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
        at org.apache.catalina.core.StandardService.start(StandardService.java:525)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
        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:289)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Mar 7, 2012 5:31:25 PM org.apache.catalina.core.StandardContext start
SEVERE: Error in resourceStart()
Mar 7, 2012 5:31:25 PM org.apache.catalina.core.StandardContext start
SEVERE: Error getConfigured
Mar 7, 2012 5:31:25 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/DWRExample] startup failed due to previous errors
Mar 7, 2012 5:31:25 PM org.apache.catalina.core.StandardContext stop
INFO: Container org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/DWRExample] has not been started
Mar 7, 2012 5:31:25 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor host-manager.xml
like image 452
user1254422 Avatar asked Mar 07 '12 14:03

user1254422


2 Answers

I ran into something similar after deleting a web app, the work directory, and the temp directory and seeing the same kind of error.

The first INFO statement before the SEVERE item logged indicates that there is a remnant of the deleted webapp that remains as a configuration item.

I was able to find an xml file nested somewhere inside conf (conf/Catalina/localhost) that had an xml file associated with the deleted web app and when I deleted it, the error went away.

like image 152
asawi Avatar answered Jun 07 '23 04:06

asawi


The context for the phantom project is being cached in the server.xml in the workspace plugin directory. This procedure worked to get rid of the SEVERE message

  1. cd to /path/to/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/conf
  2. edit the server.xml file
  3. Inside the directive remove the <Context> directive where the docBase attribute matches your phantom project
  4. Restart server in eclipse
like image 32
carbontax Avatar answered Jun 07 '23 03:06

carbontax