Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 97951 invoked from network); 17 Jun 2003 10:40:32 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 17 Jun 2003 10:40:32 -0000 Received: (qmail 5302 invoked by uid 97); 17 Jun 2003 10:42:49 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@nagoya.betaversion.org Received: (qmail 5295 invoked from network); 17 Jun 2003 10:42:49 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 17 Jun 2003 10:42:49 -0000 Received: (qmail 96475 invoked by uid 500); 17 Jun 2003 10:40:13 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 96462 invoked from network); 17 Jun 2003 10:40:12 -0000 Received: from eomer.vianetworks.nl (212.61.15.10) by daedalus.apache.org with SMTP; 17 Jun 2003 10:40:12 -0000 Received: from BAMBAM (videtur8.iae.nl [212.61.21.183]) by eomer.vianetworks.nl (Postfix) with SMTP id 8AFE12261A for ; Tue, 17 Jun 2003 12:40:11 +0200 (CEST) Message-ID: <005a01c334bd$35f3f6b0$0a00000a@BAMBAM> From: "Guus Holshuijsen" To: Subject: ClassNotFoundException Date: Tue, 17 Jun 2003 12:42:55 +0200 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0057_01C334CD.F9545720" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N ------=_NextPart_000_0057_01C334CD.F9545720 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi! I am stuck with the following "challenge". After some initial problems with my web application with regard to = ClassNotFoundExceptions when trying to read blobs from a MySQL database = which was caused by my lack of knowledge regarding the Tomcat class = loading filosophy (which is explained very well in = http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html) = I am stuck with the following: I started out with a web application that was fully selfcontained i.e. = it did not use database or JNDI resources defined in the Tomcat container. = So there was a mysql-connector-java.jar in the WEB-INF/lib of the web application and the classes were in WEB-INF/classes. While developing = under Forte4J (SunONE Studio update 1, Tomcat v4.0.1, NetBeans, Windows2000) everything seemed to work fine. Then I deployed to a RedHat Linux 8.0 = host running Tomcat v4.0.3 and I got the ClassNotFoundException. QUESTION: Can somebody explain - in terms of class loading - why I get the ClassNotFoundException when both the MySQL driver stuff and the web application are in the same class loader context (at least they are = there from my point of view). Then I changed to running Tomcat v4.1.24 both on W2000 and RH 8.0 (with = JDK 1.4.0_01), I redesigned my web application to use the Tomcat filosophy = regarding JNDI and database resources and I still got the = ClassNotFoundException, that is until I found the documentation about = class loading... What I don't like much is that I have to move part of my web application = code (the classes that are stored as blob in the database) into the = container's common/lib directory. This causes deployment of my web = application to be more difficult and makes my web application less = portable. Of course I did NOT read all of the Tomcat documentation, so I will not = say that I know all about the different ways to configure a web = application in Tomcat, but sometimes a few words in the right direction = helps me to focus. I'm off reading more of the Tomcat docs and hope for somebody out there = to enlighten me ;-)=20 Regards, Guus ------=_NextPart_000_0057_01C334CD.F9545720--