tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neil McKee <neil_mc...@inmon.com>
Subject classloader problem
Date Sat, 13 Apr 2002 00:54:08 GMT
Tomcat is awesome, but I have a vexing classloader problem...

I am using the rpm installation tomcat4-4.0.3-1 on Red Hat 7.2 with 
CATALINA_HOME set to /var/tomcat4 and CATALINA_BASE set to point to a 
different directory, where we have our own webapps.

Two of our webapps both need the same .jar file.  It works when we link 
to the jar file from within each WEB-INF/lib directory. However the jar 
accesses a JNI native library,  so we have to put that jar file 
somewhere where it can be shared  (otherwise we can get an error saying 
the native library is being loaded twice).

Following the documentation, I tried putting a link to the jar file in 
each of the following directories:

$CATALINA_HOME/lib
$CATALINA_HOME/common/lib

To my surprise the classes were not found.   In desperation I also tried:

$CATALINA_BASE/lib
$CATALINA_BASE/common/lib
$CATALINA_BASE/webapps/lib

No luck.

I checked file permissions and all that, but they were OK too.

It seems the only way these classes are getting loaded is when the jar 
file is visible under:

$CATALINA_BASE/webapps/<app-name>/WEB-INF/lib

I'm really sorry if I'm missing something obvious, but I just don't seem 
to be able to get the "shared" classloader to do its thing.

Any suggestions?

neil

-- 
Neil McKee, InMon Corp.
tel: +1 (415) 661-6343
http://www.inmon.com



--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message