tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject app class load problem in 4.1.30
Date Wed, 27 Oct 2004 21:00:36 GMT
We have a web applicaton which has been on Tomcat for some time.

We are very imtimate with Tomcat class loader issues having used tomcat for many years.
We use Sun Java 1.4.2_05 on Windows2000.

When we moved from 4.0.X to 4.1.30 we found that the classloader in /WEB-INF/classes does
not seem to work the same way.

We have a servlet-based system. We setup web.xml to load the servlet at startup.
(the servlet is com.marketplace.servlet.Marketplaces.class)

When you start Tomcat it finds the servlet and loads it (4 ways we know this).

When you call the servlet from a browser, tomcat honors the request, finds the servlet, loads
it, and executes the proper doPost/doGet methods.

BUT, ANY class that the servlet calls which is in any of *our* packages cannot be loaded.
We get a ClassDefNotFoundException (and have tried many classes, even a HelloWorld).

All our classes are in packages. (com.marketplace.[something])
Tomcat can load, find, and execute our servlet, but cannot find any classes in com.marketplace
Our class files are in C:\Tomcat_4_1_30\webapps\marketplace\WEB-INF\classes\com\marketplace\...

This worked in Tomcat 4.0.X and in a few 3.X versions, but not in 4.1.30.

The only odd thing I can think of is that the import commands in our servlet are
like this:
import com.marketplace.core.*;

Could the wildcard on the import statement be causing the problem?
If the package names match the directory structure, and the servlet is found, why would tomcat
throw a ClassDefNotFoundError on any other class in com.marketplace?

Baffled, failing, and confused,
Al G

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message