This error is quite puzzling. In my webapps, I have the log4j.properties in WEB-IF/classes as per recommendation.
When I deploy from eclipse, I do a stop on the webapp, undeploy, and then deploy. Strangely enough, 8 out of 10 times I get the following error on undeploy-
build.xml:526: FAIL - Unable to delete [C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\punch]. The continued presence of this file may cause problems.
The only file remaining under my webapp is the WEB-INF/classes/log4j.properties. Everything else is deleted.
I cannot manually delete the file or the webapp folder either. I have to stop Tomcat service, delete the folder and then restart.
Is there any solution for this?
Thanks.
Here is my remove task in build.xml
<target name="remove"
description="Remove application on servlet container">
<stop url="${manager.url}"
username="${manager.username}"
password="${manager.password}"
path="${app.path}"/>
<undeploy url="${manager.url}"
username="${manager.username}"
password="${manager.password}"
path="${app.path}"/>
</target>