tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arieh Markel <Arieh.Mar...@central.sun.com>
Subject Re: [PATCH] loading jar files from lib directory under SCCS
Date Tue, 05 Sep 2000 21:26:56 GMT

> Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm
> X-No-Archive: yes
> list-help: <mailto:tomcat-dev-help@jakarta.apache.org>
> list-unsubscribe: <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
> list-post: <mailto:tomcat-dev@jakarta.apache.org>
> Delivered-To: mailing list tomcat-dev@jakarta.apache.org
> From: Petr Jiricka <petr.jiricka@netbeans.com>
> To: tomcat-dev@jakarta.apache.org
> Cc: "Ana von Klopp Lemon (E-mail)" <Ana.Von.Klopp@eng.sun.com>
> Subject: [PATCH] loading jar files from lib directory under SCCS
> X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N
> 
> 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.

Petr,

Under similar circumstances in our projects we opted for a different
solution:

	a. do not make the WEB-INF part of the SCCS tree
	b. make it part of the 'staged area for packaging' area
	c. create utility scripts that build the content of the WEB-INF
	   hierarchy in the 'staged area' off content that is SCCS enabled.
	   
(If you want I can provide you with the scripts to do this. Contact me
via email if interested).

I would try not to special case based on directory names.

Arieh

> 
> 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
> ?
> 
> Petr
> 
> cvs server: Diffing .
> Index: LoaderInterceptor.java
> ===================================================================
> RCS file:
> /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/context/Attic/LoaderInt
> erceptor.java,v
> retrieving revision 1.2.2.1
> diff -u -r1.2.2.1 LoaderInterceptor.java
> --- LoaderInterceptor.java      2000/07/29 18:20:52     1.2.2.1
> +++ LoaderInterceptor.java      2000/09/05 16:56:37
> @@ -131,6 +131,8 @@
>          FilenameFilter dirfilter = new FilenameFilter() {
>                 public boolean accept(File dir, String fname) {
>                     File f1 = new File(dir, fname);
> +                    if ("sccs".equals(fname.toLowerCase()))
> +                        return false;
>                     if(f1.isDirectory())
>                         return true;
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org

--
 Arieh Markel		                Sun Microsystems Inc.
 Network Storage                        500 Eldorado Blvd. MS UBRM11-194
 e-mail: arieh.markel@sun.COM           Broomfield, CO 80021
 Let's go Panthers !!!!                 Phone: (303) 272-8547 x78547
 (e-mail me with subject SEND PUBLIC KEY to get public key)


Mime
View raw message