tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mario Felarca <gennad...@yahoo.com>
Subject RE: Classloader question
Date Tue, 07 May 2002 17:55:21 GMT
From: Larry Isaacs <Larry.Isaacs@sas.com>
To: 'Tomcat Users List' <tomcat-user@jakarta.apache.org>
Subject: RE: Classloader question
Date: Tue, 7 May 2002 08:17:44 -0400
MIME-Version: 1.0
Content-Type: text/plain


 >Because Tomcat 3.3.x uses the JDK delagation model for
 >classloading, classes in the "apps" classloader take priority
 >over WEB-INF/classes and WEB-INF/lib.  I don't think your
 >approach will work because of this.

Ah, but I have tweaked the webapp level classloader so that it checks in 
its own classpath first, and loads from there.

The problem I am running into is I don't know later on in the process of 
starting up, where it is trying to link this class in and what loader it is 
looking at then.

I was wondering if anyone had experience with what to do after I tell the 
classloader to load from the new location, since that is when the 
LinkageError is thrown.

 >However, there is an alternate trick that might work if you want
 >to give it a try.  Instead of placing the "shared" classes in the
 >"apps" class loader, place them somewhere else and "include" them
 >in the webapp class loader using the additionalJars attribute of
 >the LoaderInterceptor11.  See:
 >
 ><http://jakarta.apache.org/tomcat/tomcat-3.3-doc/serverxml.html#LoaderInterceptor11>
 >
 >I believe the additionalJars attribute will take directories as
 >well as jars.  I also believe the "additionalJars" will be
 >searched after WEB-INF/classes, so a different version of a
 >class in WEB-INF/classes will take priority over classes added
 >by "additionalJars".
 >

Thanks much Larry, I will give this a try. If you have any other thoughts 
on how to get around the linkage error, I would appreciate any ideas at 
this stage.

Thanks again,

Mario-


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message