Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 9274 invoked from network); 29 Apr 2006 08:46:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 29 Apr 2006 08:46:28 -0000 Received: (qmail 13491 invoked by uid 500); 29 Apr 2006 08:46:16 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 13471 invoked by uid 500); 29 Apr 2006 08:46:15 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 13460 invoked by uid 99); 29 Apr 2006 08:46:15 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 29 Apr 2006 01:46:15 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of boris.unckel.mlg@gmx.net designates 213.165.64.20 as permitted sender) Received: from [213.165.64.20] (HELO mail.gmx.net) (213.165.64.20) by apache.org (qpsmtpd/0.29) with SMTP; Sat, 29 Apr 2006 01:46:13 -0700 Received: (qmail 21274 invoked by uid 0); 29 Apr 2006 08:45:51 -0000 Received: from 84.134.201.74 by www034.gmx.net with HTTP; Sat, 29 Apr 2006 10:45:51 +0200 (MEST) Date: Sat, 29 Apr 2006 10:45:51 +0200 (MEST) From: "Boris Unckel" To: "Tomcat Users List" MIME-Version: 1.0 References: Subject: Re: Class loading from within a servlet: interface definition not found X-Priority: 3 (Normal) X-Authenticated: #143822 Message-ID: <11586.1146300351@www034.gmx.net> X-Mailer: WWW-Mail 1.6 (Global Message Exchange) X-Flags: 0001 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hello Christopher, > Von: "Christopher Piggott" > QUESTION: looking at the little diagram in the Tomcat 5.5 Class Loader > HOW-TO, when I do the above (Class.forName) I am using the Webapp class > loader, correct? Yes. > The handler classes are all in handlers.jar which is in > $CATALINA_BASE/shared/lib. The actual exception that I get is: > > 2006-04-28 17:05:55 StandardWrapperValve[xdb]: Servlet.service() > for > servlet xdb threw exception > java.lang.NoClassDefFoundError: > org/something/DatabaseRequestHandler > > Trouble is: the interface .class file is right there in > WEB-INF/classes/com/something/DatabaseRequestHandler.class just like it > should be. So, I am > stumped why the class loader would be able to find the handler class in > $CATALINA_BASE/shared/lib but NOT the interface that it implements which > is in > WEB-INF/classes. > This looks very similiar to problems with Jakarta Commons Logging, caused by wrong position of the different JCL jars. It is generally not a good idea to share JARs. This should just be done if they require it (i.E. some JDBC drivers). For JCL there is a lot of material about the special issues with wrong positions, i.E. http://wiki.apache.org/jakarta-commons/Commons_Logging_FUD Try to put everything you need under WEB-INF/lib, even if it means to copy the shared JARs into different webapps. Please post the result. Regards Boris --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org