Tomcat Error on deploy / undeploy on an application

SEVERE: Error starting static Resources
java.lang.IllegalArgumentException: Document base <application> does not exist or is not a readable directory
at org.apache.naming.resources.FileDirContext.setDocBase(
at org.apache.catalina.core.StandardContext.resourcesStart(
at org.apache.catalina.core.StandardContext.start(
at org.apache.catalina.core.ContainerBase.addChildInternal(
at org.apache.catalina.core.ContainerBase.addChild(
at org.apache.catalina.core.StandardHost.addChild(

Tomcat throws this error when the <application> path is hard-coded/set in the context but it doesn’t find the corresponding directory.

One possible reason can be that the application/war has been removed from the webapps directory but the context for this exist. Try removing the context from the conf at location {CATALINA_HOME}/conf/{Engine}/{Host}/<applicationname>.xml

You have an application called testapplication.war in webapps and now you replaced it with tryapp.war. This may lead to
above mentioned error.

1. Remove the {CATALINA_HOME}/conf/Catalina/localhost/testapplication.xml
2. Enjoy 🙂



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s