tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wells Tiedeman <>
Subject RE: The 4.0b5 doesn't recognize a servlet class
Date Tue, 17 Jul 2001 20:06:10 GMT
Any of the jars/classes containing the packages java.*, com.sun.*, javax.*,
etc.  If any of these are included in your /WEB-INF/lib directory the class
loaders get confused.

-----Original Message-----
From: Vernon Wu []
Sent: Tuesday, July 17, 2001 3:49 PM
Subject: The 4.0b5 doesn't recognize a servlet class

Hi, Wells,


Thanks for your response. 


It took me awhile trying to figure how the CLASSPATH relates with the
problem. I build up the JSP application using Tomcat 3.x with the standard
procedure. Nothing inside the project is set up in the CLASSPATH. I don't
know what you means by "all j2ee platform classes". Are the classes used
j2ee APIs?





----Original Message Follows---- 
From: Wells Tiedeman 
To: "''" 
Subject: RE: ServletException in 4.0b5 
Date: Tue, 17 Jul 2001 08:46:44 -0400 
MIME-Version: 1.0 
Received: from [] by (3.2) with ESMTP id
MHotMailBD1D7FCF00164004376140D02A290F500; Tue, 17 Jul 2001 05:51:28 -0700 
Received: (qmail 73852 invoked by uid 500); 17 Jul 2001 12:51:21 -0000 
Received: (qmail 73845 invoked from network); 17 Jul 2001 12:51:21 -0000 
Received: from (HELO
yc?exchange.yc? ( by
with SMTP; 17 Jul 2001 12:51:21 -0000 
Received: by with Internet Mail
Service (5.5.2653.19)id <3XZSJV86>; Tue, 17 Jul 2001 08:46:45 -0400 
>From tomcat-user-return-41367-vwu0 Tue, 17 Jul 2001 05:52:26 -0700 
Mailing-List: contact; run by ezmlm 
Precedence: bulk 
Delivered-To: mailing list 
X-Mailer: Internet Mail Service (5.5.2653.19) 
X-Spam-Rating: 1.6.2 0/1000/N 
I experienced the same problem. It's due to a class loader issue. Multiple 
class loaders have been introduced in V4.0 to implement the requirements 
found in Section 9.6.2 of the Servlet 2.3 Spec. These class loaders are 
used to load all of the jars and classes rather than using the CLASSPATH. 
I was able to resolve this problem as follows : 
- Add all supporting jars for your web application (except J2EE jars) to 
the /WEB-INF/lib directory rather than including them in the CLASSPATH 
- Add all of the required classes for your web application to the 
/WEB-INF/classes directory rather than including them in the CLASSPATH 
- Add the j2ee.jar from the /j2sdkee1.3/lib directory to the 
TOMCAT_HOME/common/lib directory. All J2EE platform classes must be placed 
in the common/lib or common/classes directories rather than with the web 
Wells Tiedeman 
YOUcentric, Inc. 
P: 704.401.1109 
F: 704.401.1240 
For more information on YOUcentric, please visit our web site at 
-----Original Message----- 
From: Vernon Wu [] 
Sent: Monday, July 16, 2001 7:53 PM 
Subject: ServletException in 4.0b5 
I move one our small JSP application from 3.x to 4.0b5 for the reason of 
using servlet 2.3 specification: ServletContextListener, HttpSessionListener

be more specific. 
I get the exception under the 4.0b5 with the following messages: 
Exception Report: 
javax.servlet.ServletException: Class abc.control.ControllerServlet is not a

Root Cause: 
java.lang.ClassCastException: abc.control.ControllerServlet 
There is not any indication that anywhere my code is not approprt. What I 
shall do at this situation? 
I believe that I encounter the similar situation in the 3.x, and it can be 
resolved by recycle the Tomcat server. That method doesn't work for 4.0b5. 
Get your FREE download of MSN Explorer at 


Get your FREE download of MSN Explorer at

View raw message