Tomcat Manager Not Able To (re)Deploy New War

R

Richard

We had a problem where Tomcat's manager is not able to (re)deploy a
war file after a manager remove. The problem was traced to the
situation when a servlet (or tomcat) has one or more of the servlet's
jar libs locked (in use). If this is the case, tomcat manager is not
able to delete it during the remove and any subsequent deploy fails
because the locked jar cannot be replaced by the manager.

We were not able to discover a method to prevent the jar from being
locked or a method to unlock the jar other than restarting tomcat (an
undesirable solution) and then deleting it by hand.

What we did discover is that the manager behaves differently if you
are using an optional meta-inf/context.xml file in your war file.
Instead of unpacking the war file in the webapps directory, your
application is unpacked to
tomcathome/work/Standalone/localhost/<yourappname>. This isn't really
important but what is is that when you deploy here the manager will
not fail if a jar is locked. It simply ignores the locked jar and
leaves it in place.

This behavior can be good or bad. If the jar you are replacing has a
new version that you are trying to install it's bad because it doesn't
get installed. However if the jar is the same as before then it
doesn't hurt that it is not replaced.

I just wanted to document this behavior so that when I forget I can
find this again!

Richard
willirl
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top