I just spent the last solid workday trying to debug a problem with Eclipse WTP + Tomcat 6.0 + m2eclipse. I’ve solved the problem, but I don’t even know why it works.
Here’s the situation:
- I had a set of Maven projects in Eclipse using the m2eclipse plugin
- I’m running Nexus Beta 1 locally to proxy Maven repositories
- I had gone into the .classpath, .project, and .settings of my WAR project to manually add the WTP configuration.
- I had configured a server and deployed it to a WTP-managed Tomcat 6.0 server in Eclipse
- One of the web projects depended on spring-beans-2.5.jar
Great, so I start up Tomcat and the server proceeds to continuously reload my web application. Over and over again complaining that a new JAR had been added spring-beans-2.5.jar. While the ability to hot deploy a web application in Tomcat can come in handy, doing it continuously just means that you’ll have zero availability, and thanks to a perfect storm of logging library insanity, hot deploying a webapp to Tomcat usually just eats up your PermGen space.
So, here I was stuck with a Tomcat instance that was trying to continuously deploy a web application because “A new JAR was added ‘spring-beans-2.5.jar’ every 10 seconds. Googling, the general consensus was that Tomcat will exhibit this behavior when you have a JAR library that has a timestamp “in the future”…. I kept on looking for files with timestamps in the future but I could find none.
- 4 hours trying to debug the WTP Tomcat Server.
- 4 hours trying to manually edit settings in the hidden WTP plugin tomcat files.
- 4 hours trying to move to the Run Jetty Run plugin
Then, in a fit of clarity, I decided to listen to the error message. The WTP-managed Tomcat server was complaining about spring-beans-2.5.jar, maybe upgrading to the Spring 2.5.1 dependencies would fix the problem. It did, but I still can’t figure out why the initial error was happening.
In the end, this was 12 hours spent debugging technology and not working on customer requirements. And, I still can’t tell you why it happened. Engineering software is an exercise in continuous frustration.