tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Peck <p...@advancen.com>
Subject Re: Custom ClassLoader configuration problem
Date Tue, 15 Jul 2003 03:10:00 GMT
Sorry Rita my explaination was a little brief.

I am using Tomcat 4.0.4 on Debian with JDK 1.3.1 and will be upgrading
to JDK 1.4 soon.

I have searched the web for an answer on this but no one seems to have
posted any information regarding setting up a custom class loader in
Tomcat.

I have looked at the loader.html page on the jakarta site;

http://jakarta.apache.org/tomcat/tomcat-4.0-doc/config/loader.html

And it explains how this should be done.  However when I restart tomcat
it appears that my loader does not get executed.  I have based this on
the fact that my execution code that includes writing to a file in the
constructor does not get executed.

I only get an error when I also include a class which extends
WebappLoader for the loader using the 'className' attribute in my
<Loader> tag.

Other than this Tomcat compiles and runs successfully, which makes me
wonder whether there is another way to test whether my ClassLoader is
being executed or not.

Thanks

On Tue, 2003-07-15 at 12:14, Wehike@aol.com wrote:
>  This patch may help if you are compiling with JDK1.3 and using Tomcat5: 
> 
> http://archives.real-time.com/pipermail/tomcat-devel/2003-February/046413.html
> 
> 
> Rita
> 
> In a message dated 7/14/03 9:14:05 PM Eastern Daylight Time, 
> peck@advancen.com writes:
> 
> 
> > Subj:Custom ClassLoader configuration problem
> > Date:7/14/03 9:14:05 PM Eastern Daylight Time
> > From:    peck@advancen.com (Stephen Peck)
> > Reply-to: <A HREF="mailto:tomcat-user@jakarta.apache.org">tomcat-user@jakarta.apache.org</A>
(Tomcat Users List)
> > To:    tomcat-user@jakarta.apache.org
> > 
> > 
> > 
> > 
> > Can anyone help me with custom class loaders in Tomcat.
> > 
> > I am trying to add a custom class loader that will retrieve classes from
> > a source other than the normal class path entries and cannot figure how
> > to get Tomcat to load my Class loader chained to WebappLoader.
> > 
> > I have tried entering the following code into server.xml
> > 
> > <Context path="" docBase="ROOT" debug="1">
> > <Loader loaderClass="RemoteClassLoader" delegate="true"/>
> > </Context>
> > 
> > And this seems to throw no errors but does not get used or at any point
> > execute any code in the constructors of the class loader.
> > 
> > When I added a 'RemoteLoader' class which extended WebappLoader,
> > catalina threw a NoClassDefFoundError for WebappLoader. I assume this is
> > because catalina.jar has not yet been loaded, only bootstrap at this
> > point.
> > 
> > If anyone has successfully achieved a similar process could you help me
> > out.  I noticed Joe User had a similar question, if you figured it out
> > maybe you could point me in the rigth direction
> > 
> > 
> 
> 


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


Mime
View raw message