Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 78242 invoked from network); 20 Feb 2007 14:03:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Feb 2007 14:03:15 -0000 Received: (qmail 71426 invoked by uid 500); 20 Feb 2007 14:03:09 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 71236 invoked by uid 500); 20 Feb 2007 14:03:08 -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 71225 invoked by uid 99); 20 Feb 2007 14:03:08 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Feb 2007 06:03:08 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.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; Tue, 20 Feb 2007 06:02:57 -0800 Received: (qmail invoked by alias); 20 Feb 2007 14:02:35 -0000 X-Provags-ID: V01U2FsdGVkX1+I0YhD1h2IHWx9csuvcuoHMIR0Sca5SCZxxiOa+p j/vQ== Message-ID: <45DAFF80.8090203@gmx.net> Date: Tue, 20 Feb 2007 15:02:40 +0100 From: Boris Unckel User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Classloading scenario References: <4ac1e6310702200200x505d0d7fo1b97db18ab5372cd@mail.gmail.com> In-Reply-To: <4ac1e6310702200200x505d0d7fo1b97db18ab5372cd@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Virus-Checked: Checked by ClamAV on apache.org Hello, Angel Todorov wrote: > I have the following scenario: one webapp, which has some jars in its > private WEB-INF\lib dir, and one common jar which I would like to > share among several webapps. Hence, I am putting this jar into the > shared\lib directory of Tomcat. The problem is that this common lib > references classes which are in jars in the first webapp's WEB\lib > directory. Therefore, I get NoClassDefFoundErrors when this common jar > loads and tries to refer classes from the webapp's private lib. > > Is it possible to achieve a workaround with tomcat's classloading for > that custom scenario? there is no workaround, but a better strategy and best practise: Put *all* JARs of a webapp into WEB-INF/lib, if there is not a strong usecase or technical reason to do otherwise (i.E. some JDBC drivers should be put into common/lib or shared/lib). Sharing classes causes definitly more problems than it solves. Regards Boris --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org