Monday, March 31, 2008

Tomcat redeployment problem

Sometimes when we redeploy a war in tomcat it fails. If you take a look at the webapps folder in tomcat you would notice that .war file is deleted, but exploded folder of the webapp that you have been trying to redeploy is still hanging in there. I guess somehow the tomcat locks the folder and the process of redeployment fails as the folder already exist. It turns out that you have to stop tomcat and delete the folder manually.

To overcome this problem you can edit tomcat's server.xml (inside TOMCAT_HOME/conf folder) file to change the tag
name="localhost" appbase="webapps" unpackwars="true" autodeploy="true" xmlvalidation="false" xmlnamespaceaware="false"

to
name="localhost" appbase="webapps" unpackwars="false" autodeploy="true" xmlvalidation="false" xmlnamespaceaware="false"

0 comments:

Post a Comment