Guys,
I've copied in an email returned to a support desk regarding a problem
similar to this. There is a link to mikal.org that explains it in better
detail, but essentially it refers to where your classes are found, as to
what classloader they inherit. And the solution we found (similar to the
post) is to ensure your classpath is unset before starting Tomcat.

Regards,
Andrew Mc.Ghee

> Thanks again for your help on this,
> Looks like we have tracked down the problem, and it was due to a reference
to the Poet SDK on the CLASSPATH. References to > Poet code was finding the
class instance on the jar file specified within the CLASSPATH itself, and so
was not having
> access to the classloader from tomcat, making anything within
webapps/WEB-INF/lib unavailable. We have simply removed the
> reference to the poet jar files from the classpath, and placed the jar
file within the webapps/WEB-INF/lib directory, and
> voila! (No need to set the database classloader now either)

> Thanks again for your assistance in this, pointing out the classpath
loading help to isolate the problem.

> A useful link regarding this problem was;
http://mikal.org/interests/java/tomcat/archive/view?mesg=22444 (And probably
> explains the situation far better than I can)

-----Original Message-----

-----Original Message-----
From: David Rees [mailto:[EMAIL PROTECTED]]
Sent: 19 July 2001 22:27
To: [EMAIL PROTECTED]
Subject: Re: [3.2] JSP Compiling Classpath issues -- finding
WEB-INF/classes


(Sorry about the double-qoute, I missed the original message)

> > -----Original Message-----
> > From: Will England [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, July 19, 2001 10:49 AM
> > To: [EMAIL PROTECTED]
> > Subject: [3.2] JSP Compiling Classpath issues -- finding WEB-INF/classes
> >
> >
> > Greetings!
> >
> > Over on tomcat-users, theres been a discussion on JSP's finding the
> > WEB-INF/classes directory when compiling.  They can't.  From searches, I
> > understand this issue has come up before in regards to the Coocon
project.
> >
> > The root problem is that Jasper cannot find classes located in
> > WEB-INF/classes of the web application that the JSP's belong to.  This
> > occurs when a JSP is either first deployed or the TOMCAT_HOME/work
> > directory is cleared, requiring a recompile of the JSP's.
> >
> > The system is Tomcat 3.2 under Apache with mod_jk, running on SunOS 2.7
> > with JDK 1.2.

I have noticed the same problem while doing some development using
Tomcat 3.2.[23].  I worked around it by making sure that I unset the
classpath before calling startup.sh, then things seemed to work properly
and classes were found as expected.

It seems that certain combinations of classes in different ares
(CLASSPATH, WEB-INF/lib, or other) will break things, but I haven't
pinned it down, so it could simply be user stupidity.

-Dave

Reply via email to