tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vernon Wu" <v...@hotmail.com>
Subject The 4.0b5 doesn't recognize a servlet class
Date Tue, 17 Jul 2001 19:49:25 GMT
<html><DIV>
<P><BR><BR></P>
<DIV></DIV>
<P>Hi, Wells,</P></DIV>
<P>&nbsp;</P>
<DIV></DIV>
<P>Thanks for your response. </P>
<DIV></DIV>
<P>&nbsp;</P>
<DIV></DIV>
<P>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?</P>
<P>&nbsp;</P>
<P>Thx.</P>
<P>&nbsp;</P>
<P>Vernon<BR><BR></P>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>----Original Message Follows---- 
<DIV></DIV>
<DIV></DIV>From: Wells Tiedeman <JWTIEDEMAN@YOUCENTRIC.COM>
<DIV></DIV>
<DIV></DIV>Reply-To: tomcat-user@jakarta.apache.org 
<DIV></DIV>
<DIV></DIV>To: "'tomcat-user@jakarta.apache.org'" <TOMCAT-USER@JAKARTA.APACHE.ORG>
<DIV></DIV>
<DIV></DIV>Subject: RE: ServletException in 4.0b5 
<DIV></DIV>
<DIV></DIV>Date: Tue, 17 Jul 2001 08:46:44 -0400 
<DIV></DIV>
<DIV></DIV>MIME-Version: 1.0 
<DIV></DIV>
<DIV></DIV>Received: from [64.208.42.41] by hotmail.com (3.2) with ESMTP id MHotMailBD1D7FCF00164004376140D02A290F500;
Tue, 17 Jul 2001 05:51:28 -0700 
<DIV></DIV>
<DIV></DIV>Received: (qmail 73852 invoked by uid 500); 17 Jul 2001 12:51:21 -0000

<DIV></DIV>
<DIV></DIV>Received: (qmail 73845 invoked from network); 17 Jul 2001 12:51:21
-0000 
<DIV></DIV>
<DIV></DIV>Received: from salesvision-gw.youcentric.com (HELO yc?exchange.yc?exchange.salesvision.com)
(12.19.52.2) by h31.sny.collab.net with SMTP; 17 Jul 2001 12:51:21 -0000 
<DIV></DIV>
<DIV></DIV>Received: by yc_exchange.yc_exchange.salesvision.com with Internet
Mail Service (5.5.2653.19)id &lt;3XZSJV86&gt;; Tue, 17 Jul 2001 08:46:45 -0400 
<DIV></DIV>
<DIV></DIV>From tomcat-user-return-41367-vwu0 Tue, 17 Jul 2001 05:52:26 -0700

<DIV></DIV>
<DIV></DIV>Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm

<DIV></DIV>
<DIV></DIV>Precedence: bulk 
<DIV></DIV>
<DIV></DIV>list-help: <?xml:namespace prefix = mailto /><mailto:tomcat-user-help@jakarta.apache.org>
<DIV></DIV>
<DIV></DIV>list-unsubscribe: <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
<DIV></DIV>
<DIV></DIV>list-post: <mailto:tomcat-user@jakarta.apache.org>
<DIV></DIV>
<DIV></DIV>Delivered-To: mailing list tomcat-user@jakarta.apache.org 
<DIV></DIV>
<DIV></DIV>Message-ID: &lt;15082D39DCA99746A53E37B280DCB10AC04C06@yc_exchange.yc_exchange.salesvision.com&gt;

<DIV></DIV>
<DIV></DIV>X-Mailer: Internet Mail Service (5.5.2653.19) 
<DIV></DIV>
<DIV></DIV>X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N 
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>I experienced the same problem. It's due to a class loader issue. Multiple

<DIV></DIV>
<DIV></DIV>class loaders have been introduced in V4.0 to implement the requirements

<DIV></DIV>
<DIV></DIV>found in Section 9.6.2 of the Servlet 2.3 Spec. These class loaders
are 
<DIV></DIV>
<DIV></DIV>used to load all of the jars and classes rather than using the CLASSPATH.

<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>I was able to resolve this problem as follows : 
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>- Add all supporting jars for your web application (except J2EE jars)
to 
<DIV></DIV>
<DIV></DIV>the /WEB-INF/lib directory rather than including them in the CLASSPATH

<DIV></DIV>
<DIV></DIV>- Add all of the required classes for your web application to the 
<DIV></DIV>
<DIV></DIV>/WEB-INF/classes directory rather than including them in the CLASSPATH

<DIV></DIV>
<DIV></DIV>- Add the j2ee.jar from the /j2sdkee1.3/lib directory to the 
<DIV></DIV>
<DIV></DIV>TOMCAT_HOME/common/lib directory. All J2EE platform classes must be
placed 
<DIV></DIV>
<DIV></DIV>in the common/lib or common/classes directories rather than with the
web 
<DIV></DIV>
<DIV></DIV>application. 
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>-Wells 
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>Wells Tiedeman 
<DIV></DIV>
<DIV></DIV>YOUcentric, Inc. 
<DIV></DIV>
<DIV></DIV>P: 704.401.1109 
<DIV></DIV>
<DIV></DIV>F: 704.401.1240 
<DIV></DIV>
<DIV></DIV>jwtiedeman@youcentric.com <mailto:jwtiedeman@youcentric.com>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>For more information on YOUcentric, please visit our web site at 
<DIV></DIV>
<DIV></DIV>www.youcentric.com 
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>-----Original Message----- 
<DIV></DIV>
<DIV></DIV>From: Vernon Wu [mailto:vwu0@hotmail.com] 
<DIV></DIV>
<DIV></DIV>Sent: Monday, July 16, 2001 7:53 PM 
<DIV></DIV>
<DIV></DIV>To: tomcat-user@jakarta.apache.org 
<DIV></DIV>
<DIV></DIV>Subject: ServletException in 4.0b5 
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>I move one our small JSP application from 3.x to 4.0b5 for the reason
of 
<DIV></DIV>
<DIV></DIV>using servlet 2.3 specification: ServletContextListener, HttpSessionListener

<DIV></DIV>
<DIV></DIV>be more specific. 
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>I get the exception under the 4.0b5 with the following messages: 
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>Exception Report: 
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>javax.servlet.ServletException: Class abc.control.ControllerServlet
is not a 
<DIV></DIV>
<DIV></DIV>Servlet 
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>.... 
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>Root Cause: 
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>java.lang.ClassCastException: abc.control.ControllerServlet 
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>... 
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>There is not any indication that anywhere my code is not approprt.
What I 
<DIV></DIV>
<DIV></DIV>shall do at this situation? 
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>I believe that I encounter the similar situation in the 3.x, and it
can be 
<DIV></DIV>
<DIV></DIV>resolved by recycle the Tomcat server. That method doesn't work for
4.0b5. 
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>Thanks. 
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>Vernon 
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>_____ 
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>Get your FREE download of MSN Explorer at http://explorer.msn.com 
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV></mailto:jwtiedeman@youcentric.com></mailto:tomcat-user@jakarta.apache.org></mailto:tomcat-user-unsubscribe@jakarta.apache.org></mailto:tomcat-user-help@jakarta.apache.org><br
clear=all><hr>Get your FREE download of MSN Explorer at <a href="http://explorer.msn.com">http://explorer.msn.com</a><br></p></html>

Mime
View raw message