views:

384

answers:

5

I have a tomcat application which, the first time I start Tomcat after starting eclipse, I get a n odd NoClassDefFoundError. If I then stop and restart tomcat through eclipse, it works fine. I have single, double, and triple checked the classpath and everything seems fine. Anyone ever seen anythign like this before?

relevant versions:

Tomat 5.5.17
eclipse 3.3 europa
tomcat plug-in for eclipse by sysdeo:
com.sysdeo.eclipse.tomcat_3.2.1

A: 

Nope, never saw it. It is very unlikely that the class is present and that it is a classloader problem. What is the class that is missing. It is probably that it is occasionally going through some error condition

e.g. trying to open a port that is already open

and the error is causing it to try and load this specific class

Liam
+1  A: 

I notice that this is a pretty old version of Tomcat, that might be contributing to the problem. You could try the following

  1. Start Eclipse.
  2. Clean your webapp project (build if automatic build is off)
  3. Start the Tomcat server.

That's the only thing I can think of. Other than that I would recommend getting the latest 5.5 version of tomcat (I think it is 5.5.25)

Dunderklumpen
A: 

I've found the tomcat plugin to be generally buggy, and have stopped using it.

In my consulting job, I worked with a team that had all manner of stability issues with their application in development. Removing the tomcat plugin, and just having them start/stop tomcat from the command-line fixed all of the issues.

A: 

What is the class that is missing? Have you trying starting and stopping tomcat with wtp instead of sysdeo?

Yoni
+1  A: 

I had problems like these as well, I think I solved it by linking in a whole folder of classes, a different folder though, there were copies of the libraries in a few places, and the Tomcat server needs the libraries from it's runtime imported into the project.

Karl