tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guus Holshuijsen" <guus.holshuij...@videtur.nl>
Subject Re: Tomcat Class Loader (parent/child tree)
Date Wed, 18 Jun 2003 16:30:10 GMT
All,

Just to let you know that I found out what caused the ClassNotFoundException
problem.

I found the answer in the release notes of Tomcat 4.0.6. It says the
following:

Tomcat 4.0 and Sun JDK 1.4 beta 3
Some unpredictable classloading behaviour has been reported when Tomcat is
used with Sun JDK 1.4 beta 3. The problem has been fixed with Sun JDK 1.4
Release Candidate or later.

I was using Sun JDK 1.4.0_01-b3 together with Tomcat 4.0.3 (which did not
give me any problems) and with Tomcat 4.1.24 (which continuously gave me
ClassNotFoundExceptions when retrieving BLOBs from the MySQL database).

Regards,
Guus
----- Original Message -----
From: "Guus Holshuijsen" <guus.holshuijsen@videtur.nl>
To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
Sent: Tuesday, June 17, 2003 4:47 PM
Subject: Re: Tomcat Class Loader (parent/child tree)


> Julien,
>
> The tomcat documentation also mentions:
> "As mentioned above, the web application class loader diverges from the
> default Java 2 delegation model (in accordance with the recommendations in
> the Servlet Specification, version 2.3, section 9.6). When a request to
load
> a class from the web application's WebappX class loader is processed, this
> class loader will look in the local repostories FIRST, instead of
delegating
> before looking. All other class loaders in Tomcat 4 follow the usual
> delegation pattern."
>
> Therefor I don't think there is any contradiction. The Class loader HOWTO
is
> pretty interesting to read especially when all sections are read. I had to
> spend several days on a class loading problem and asked for help before
> somebody pointed me at this howto and adviced me to read it. ;-)
>
> Regards,
> Guus
> ----- Original Message -----
> From: <julien-martin@wanadoo.fr>
> To: <tomcat-user@jakarta.apache.org>
> Sent: Tuesday, June 17, 2003 3:50 PM
> Subject: Tomcat Class Loader (parent/child tree)
>
>
> >
> > Hello,
> >
> > According to the tomcat documentation:
> >
> > "Normally, when a class loader is asked to load a particular
> > class or resource, it delegates the request to a parent class
> > loader first, and then looks in its own repositories only if
> > the parent class loader(s) cannot find the requested class or
> > resource."
> >
> > >From what I understand from the documentation, the common/lib
> > directory is a parent to the webapp1/lib directory and therefore
> > according to the preceding quote, Tomcat should look first in
> > common/lib and THEN in webapp1/lib.
> >
> > I tried putting two identically-named classes in the common/lib
> > directory and in the webapp1/lib.  My jsp uses the class loaded
> > from webapp1/lib and not the class loaded from common/lib.  Is
> > this not contradictory??
> >
> > Julien.
> >
> >
> > -----
> > Sent using MailStart.com ( http://MailStart.Com/welcome.html )
> > The FREE way to access your mailbox via any web browser, anywhere!
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
>


---------------------------------------------------------------------
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