Return-Path: Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 61990 invoked from network); 5 Sep 2000 17:51:59 -0000 Received: from mercury.sun.com (192.9.25.1) by locus.apache.org with SMTP; 5 Sep 2000 17:51:59 -0000 Received: from taller.eng.sun.com ([129.144.125.34]) by mercury.Sun.COM (8.9.3+Sun/8.9.3) with ESMTP id KAA02381 for ; Tue, 5 Sep 2000 10:51:56 -0700 (PDT) Received: from eng.sun.com (florence [129.144.251.146]) by taller.eng.sun.com (8.9.3+Sun/8.9.3/ENSMAIL,v1.7) with ESMTP id KAA14846; Tue, 5 Sep 2000 10:34:20 -0700 (PDT) Message-ID: <39B52ED7.DA875BCE@eng.sun.com> Date: Tue, 05 Sep 2000 10:35:19 -0700 From: "Craig R. McClanahan" X-Mailer: Mozilla 4.74 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: tomcat-dev@jakarta.apache.org CC: "Ana von Klopp Lemon (E-mail)" Subject: Re: [PATCH] loading jar files from lib directory under SCCS References: <10F82FC788E0D311AB820060083EAE1E08183C@mail.netbeans.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N See below. Petr Jiricka wrote: > Hello, > > my colleagues found a problem with jar files in the "lib" directory when > using SCCS-based version control systems (such as TeamWare). > > The problem is that TeamWare creates a "SCCS" subdirectory under each > directory, and in this directory it creates files with similar names as the > original directory. So for example if the WEB-INF/lib directory contains a > file called library.jar, then WEB-INF/lib/SCCS directory will contain a file > called s.library.jar. This file is not a valid jar file. So when Tomcat adds > all jars from WEB-INF/lib and its subdirectories into its classpath, the > classloader will complain about a corrupted jar file and thow an exception. > > This can be fixed by not including SCCS in the directories from which jar > files are recursively added into the web app classpath. > > The following patch is against the tomcat_32 branch, the patch for Tomcat > 3.3 would be analogous. > > How do you feel about this patch ? And what about for tomcat_32 ? Also, do > you know any other version control systems which could have the same problem > ? > If Tomcat 3.2 is loading JAR files from nested directories *underneath* WEB-INF/lib, it is broken and needs to be fixed. The spec is pretty clear that only classes in "WEB-INF/lib/*.jar" are made available to the web app -- so it should never be finding the WEB-INF/lib/SCCS/*.jar files in the first place [see Section 9.4 of the 2.2 spec, in particular the enumerated list of the contents of WEB-INF just before section 9.4.1]. > > Petr > Craig McClanahan ==================== See you at ApacheCon Europe ! Session VS01 (23-Oct 13h00-17h00): Sun Technical Briefing Session T06 (24-Oct 14h00-15h00): Migrating Apache JServ Applications to Tomcat