Hi all,
I posted a similar question a couple days ago but it seems the well-intended responses I received were incorrect.
And let me first say that I have RTFMs -- more than once -- and this *SHOULD* work, at least according to TFMs.
I'm using TC v5.0.9 on Linux with J2SE 1.4.2_01.
Very simply, I have a Jar with some custom classes in $CATALINA_HOME/shared/lib/. These classes are not being found in my web application. Instead, I get a NoClassDefFoundError. If I move the Jar to $CATALINA_HOME/common/lib/, the classes are found with no problem.
Somebody, please, just do what I described above and tell me if you can get classes to load from a jar in $CATALINA_HOME/shared/lib.
According to the Tomcat docs, Jar files in $CATALINA_HOME/shared/lib/ *SHOULD BE AVAILABLE* to a web app. See the TC documentation at: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/class-loader-howto.html
I'm wondering if the TC docs are once again in error....
Please don't whine.
As far as I am concerned, the feature works, and the documetation is right. However, the shared CL is very error prone because it is stuck in between the two main CL (the webapp CL and the main common CL) for class visibility problems.
(ie, the JARs from common can't see JARs form the shared loader, and the JARs in shared can't see the JARs in the webapp CL)
Inside your webapp code, you can do a Thread.currentThread().getContextClassLoader().toString() to get a view of the CL hierarchy and all the class repositories which are initialized on each level.
-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxx R�my Maucherat Senior Developer & Consultant JBoss Group (Europe) S�RL xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
