aspose file tools*
The moose likes Tomcat and the fly likes JAR file is locked when doing a remove Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "JAR file is locked when doing a remove" Watch "JAR file is locked when doing a remove" New topic
Author

JAR file is locked when doing a remove

Charlie Craft
Greenhorn

Joined: Feb 13, 2004
Posts: 7
I have successfully deployed a webapp that has some JAR files in the <app>/WEB-INF/lib directory. When I click remove in tomcat manager for this webapp the application directory is not removed under <tomcat>/webapps because 2 JAR files remain in the <app>/WEB-INF/lib directory and are locked by tomcat. To remove them I have to shutdown tomcat. If they are not removed and tomcat is restarted it thinks it has a blank application.
Has anyone else come across this and is there any way to get the 'remove' to delete these JAR files so I don't have to shutdown tomcat and delete them manually?
Charlie Craft
Greenhorn

Joined: Feb 13, 2004
Posts: 7
Have found a workaround for this. The JAR files can be moved into the /shared/lib directory. Not ideal, but fixes the problem.
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

not so much that they're locked by tomcat, but your OS (you're using Windows?) I've had this problem with windows in the past.
 
 
subject: JAR file is locked when doing a remove