shsteimer
shsteimer

Reputation: 28800

ClassDefNotFound first time I start Tomcat from within Eclipse

I have a Tomcat application which, the first time I start Tomcat after starting Eclipse, I get an 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 anything like this before?

relevant versions:

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

Upvotes: 0

Views: 744

Answers (5)

Karl
Karl

Reputation: 9155

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.

Upvotes: 1

Yoni
Yoni

Reputation: 10321

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

Upvotes: 0

Rich
Rich

Reputation:

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.

Upvotes: 0

Dunderklumpen
Dunderklumpen

Reputation: 1874

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)

Upvotes: 1

Liam
Liam

Reputation: 8092

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

Upvotes: -1

Related Questions