Thursday, July 17, 2008

Apache Tomcat 6.0 Cannot Undeploy Correctly

This 3 months I have been using Tomcat 6.0 for deployment, and one thing that I don't like is that the application server needs to be restarted most of the time when deploying. I remember that this is not the case with my previous development. I thought it was because the Tomcat 6.0. Later I found out that the problem is with the struts-core-1.3.9.jar library.

Several attempts have been made to use the antiJARLocking and antiResourceLocking features of Tomcat. All ends up in futility.

The struts-core-1.3.9.jar (as well as version 1.3.5, 1.3.8) as setup by maven 2 dependency, depends on the Apache commons-digester-1.8.jar. This version (1.8) of the commons-digester library has this bug specific to Windows environment.

There are some workarounds that is possible:

  • Upgrade to higher version of Struts (in the case of my current work, we are moving to struts2 which known not to have this problem)

  • Override the maven 2 dependency, and inject a new dependency to higher version of commons-digester library


First option is obvious, the next will be a bit tricky.
I will show you how to do it later...

No comments:

Post a Comment