tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chad Maniccia" <cmanic...@majorbrand.com>
Subject RE: app class load problem in 4.1.30
Date Wed, 27 Oct 2004 21:22:31 GMT
Hi Al,

Can you load classes in the lib directory?

Tell the old peeps hi.

Chad

-----Original Message-----
From: agidden@hotlink.com [mailto:agidden@hotlink.com] 
Sent: Wednesday, October 27, 2004 4:01 PM
To: tomcat-user@jakarta.apache.org
Subject: app class load problem in 4.1.30

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 otherwise.
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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message