Originally posted by Nimala Rayudu:
Ben,
The file has read-only permission in the web-application's lib directory when it is deployed, but so do all other library files I have in the lib directory, and all of them are deleted by Tomcat.
thanks
This is a known problem with Tomcat under WinWows, but not when running under Solaris or Linux. I've been fighting with it all day and have found some documentation in
the Tomcat Windows FAQ. The faq suggests using the antiJARLocking attribute in the context.xml file to prevent this. I haven't tried this yet, but conversations on the Sun forums indicate that it isn't fully fixed as of Tomcat-5.5.7.
I use WinXP as my development environment and Solaris as my run environment and have different
Ant targets for producing the war files. For Windows I put most of the jars in commons/lib which may cause classloader problems if multiple apps use the jars, but I only run one app under windows. For Solaris I put the jars in WEB-INF/lib where they belong. I know its a nasty kludge, but it works.
One package that really doesn't belong in common/lib is Velocity, its jars MUST be in WEB-INF/lib since it uses the Singleton
Pattern, luckily it doesn't have the locked jars problem. The Hibernate documentation warns against putting anything in common/lib.