I noticed that most of the timeI when I tried to re-deploy the petclinic application (undeploy and browse deploy) that the hot deploy would fail, or to be more precise the undeploy would only partially work.

The problem appeared to be that certain jar files of the application remained locked and therefore could not be deleted from the windows directory (C:\workspace\tools\apache-tomcat-5.5.23\webapps\petclinic)

I looked into several issues:

FINALLY...

  • I found a blog entry that described the problem and how to fix it.

http://blog.exis.com/colin/archives/2005/08/23/i-put-a-spell-on-you-because-youre-mine-aka-why-is-tomcat-holding-onto-jars/

I've put the fix into the repository in

C:\workspace\tools\apache-tomcat-5.5.23\conf\context.xml

changing:
<Context>
to:
<Context antiJARLocking="true">

NOTE: I don't know if this will cause problems for linux users.

  • No labels