Don’t let Tomcat lock your jar files

Posted on April 30, 2007

0


This problems appears on Windows boxes since windows underlying file system likes to lock files if they are used. with antiJarlocking = true Tomcat will create unpack the jar in a temporary location and use those files and not the original jar. This way Windows will lock some files you are not aware of and are free to work with the jar without getting any exceptions.

Try create context.xml in META-INF:

<Context antiResourceLocking="true" 
  antiJARLocking="true">
</Context> 

and redeploy web app. Tested on Tomcat 5.5

Advertisements
Posted in: Development