You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jacob Kjome <ho...@visi.com> on 2003/01/02 23:29:55 UTC

Tomcat 5 and CATALINA_BASE/shared/lib problem...

Hi all,

Using Tomcat-4.1.x, I can have separate instances of Tomcat running which 
access their own shared/lib folder.  In Tomcat-5.0 latest nightly build, 
that doesn't seem to be the case.

For instance, using Tomcat-4.1.18, if I have some jars in 
CATALINA_HOME/shared/lib and I start up a new tomcat instance with 
CATALINA_BASE set as something other than CATALINA_HOME, the jars in 
CATALINA_HOME/shared/lib will *not* be loaded.  Instead, jars will be 
loaded from CATALINA_BASE/shared/lib (if it exists).  This is the behavior 
I expect and love!

However, using Tomcat-5.0, if I set things up the same way, jars in 
CATALNIA_HOME/shared/lib *will* be loaded and jars in 
CATALNIA_BASE/shared/lib are completely ignored....or it could be that it 
is picking up both of them, but loading jars in CATALINA_HOME/shared/lib 
first and then looking in CATALINA_BASE/shared/lib.  If a jar in the latter 
contains the same packages that were already loaded in the former, then the 
latter is ignored.  Either way, Tomcat-4.1.x completely ignores 
CATALINA_HOME/shared/lib if CATALINA_BASE is set and is different from 
CATALINA_HOME where Tomcat-5 loads CATALINA_HOME/shared/lib jars no matter 
what.  This is behavior that I don't expect and don't like.

I used the ability to separate instances to run apps which required 
different versions of xerces.  I put xerces-1.4.4.jar in 
CATALINA_HOME/shared/lib for apps which I use most often.  However, I have 
other apps that need either slightly modified version of xerces-1.4.4 or 
require xerces-2.x.x.  For those cases, I run a separate instance of Tomcat 
using a custom set CATALNIA_BASE with a local shared/lib with the 
appropriately versioned jars that I need for this particular app.

So, this is a great feature in Tomcat-4.1.x (and, I imagine, Tomcat-4.0.x) 
but it seems to be broken in Tomcat-5.0.  Is this new behavior in 
Tomcat-5.0 a bug or was it intentional?  If it was intentional, can someone 
explain the reasons for the change in behavior to that of Tomcat-4.1.x?

Thanks,

Jake


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Tomcat 5 and CATALINA_BASE/shared/lib problem...

Posted by Jacob Kjome <ho...@visi.com>.
Bug reported here:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15774

Can someone please explain why the behavior is different and/or confirm 
that it is a real bug in Tomcat5?

Thanks,

Jake

At 09:26 PM 1/2/2003 -0600, you wrote:

>Just a little follow-up to what I said below.  I had surmised that maybe 
>CATALINA_HOME/shared/lib libraries where simply getting loaded first and 
>maybe CATALINA_BASE/shared/lib libraries that had the same packages 
>wouldn't be loaded because they would only be loaded once by 
>Tomcat.  Well, this is false.  CATALINA_BASE/shared/lib is entirely 
>ignored and libraries from CATALINA_HOME/shared/lib are always loaded even 
>if CATALINA_BASE is set to a value different from CATALINA_HOME.
>
>This is either a bug in Tomcat5 or a conscious decision was made to change 
>the behavior or Tomcat5 -vs- Tomcat-4.1.x (and probably also Tomcat-4.0.x).
>
>Can anyone confirm this?  Should I report this as a bug in Bugzilla?
>
>Jake
>
>At 04:29 PM 1/2/2003 -0600, you wrote:
>
>>Hi all,
>>
>>Using Tomcat-4.1.x, I can have separate instances of Tomcat running which 
>>access their own shared/lib folder.  In Tomcat-5.0 latest nightly build, 
>>that doesn't seem to be the case.
>>
>>For instance, using Tomcat-4.1.18, if I have some jars in 
>>CATALINA_HOME/shared/lib and I start up a new tomcat instance with 
>>CATALINA_BASE set as something other than CATALINA_HOME, the jars in 
>>CATALINA_HOME/shared/lib will *not* be loaded.  Instead, jars will be 
>>loaded from CATALINA_BASE/shared/lib (if it exists).  This is the 
>>behavior I expect and love!
>>
>>However, using Tomcat-5.0, if I set things up the same way, jars in 
>>CATALNIA_HOME/shared/lib *will* be loaded and jars in 
>>CATALNIA_BASE/shared/lib are completely ignored....or it could be that it 
>>is picking up both of them, but loading jars in CATALINA_HOME/shared/lib 
>>first and then looking in CATALINA_BASE/shared/lib.  If a jar in the 
>>latter contains the same packages that were already loaded in the former, 
>>then the latter is ignored.  Either way, Tomcat-4.1.x completely ignores 
>>CATALINA_HOME/shared/lib if CATALINA_BASE is set and is different from 
>>CATALINA_HOME where Tomcat-5 loads CATALINA_HOME/shared/lib jars no 
>>matter what.  This is behavior that I don't expect and don't like.
>>
>>I used the ability to separate instances to run apps which required 
>>different versions of xerces.  I put xerces-1.4.4.jar in 
>>CATALINA_HOME/shared/lib for apps which I use most often.  However, I 
>>have other apps that need either slightly modified version of 
>>xerces-1.4.4 or require xerces-2.x.x.  For those cases, I run a separate 
>>instance of Tomcat using a custom set CATALNIA_BASE with a local 
>>shared/lib with the appropriately versioned jars that I need for this 
>>particular app.
>>
>>So, this is a great feature in Tomcat-4.1.x (and, I imagine, 
>>Tomcat-4.0.x) but it seems to be broken in Tomcat-5.0.  Is this new 
>>behavior in Tomcat-5.0 a bug or was it intentional?  If it was 
>>intentional, can someone explain the reasons for the change in behavior 
>>to that of Tomcat-4.1.x?
>>
>>Thanks,
>>
>>Jake
>>
>>
>>--
>>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>>For additional commands, e-mail: <ma...@jakarta.apache.org>

Re: Tomcat 5 and CATALINA_BASE/shared/lib problem...

Posted by Jacob Kjome <ho...@visi.com>.
Just a little follow-up to what I said below.  I had surmised that maybe 
CATALINA_HOME/shared/lib libraries where simply getting loaded first and 
maybe CATALINA_BASE/shared/lib libraries that had the same packages 
wouldn't be loaded because they would only be loaded once by Tomcat.  Well, 
this is false.  CATALINA_BASE/shared/lib is entirely ignored and libraries 
from CATALINA_HOME/shared/lib are always loaded even if CATALINA_BASE is 
set to a value different from CATALINA_HOME.

This is either a bug in Tomcat5 or a conscious decision was made to change 
the behavior or Tomcat5 -vs- Tomcat-4.1.x (and probably also Tomcat-4.0.x).

Can anyone confirm this?  Should I report this as a bug in Bugzilla?

Jake

At 04:29 PM 1/2/2003 -0600, you wrote:

>Hi all,
>
>Using Tomcat-4.1.x, I can have separate instances of Tomcat running which 
>access their own shared/lib folder.  In Tomcat-5.0 latest nightly build, 
>that doesn't seem to be the case.
>
>For instance, using Tomcat-4.1.18, if I have some jars in 
>CATALINA_HOME/shared/lib and I start up a new tomcat instance with 
>CATALINA_BASE set as something other than CATALINA_HOME, the jars in 
>CATALINA_HOME/shared/lib will *not* be loaded.  Instead, jars will be 
>loaded from CATALINA_BASE/shared/lib (if it exists).  This is the behavior 
>I expect and love!
>
>However, using Tomcat-5.0, if I set things up the same way, jars in 
>CATALNIA_HOME/shared/lib *will* be loaded and jars in 
>CATALNIA_BASE/shared/lib are completely ignored....or it could be that it 
>is picking up both of them, but loading jars in CATALINA_HOME/shared/lib 
>first and then looking in CATALINA_BASE/shared/lib.  If a jar in the 
>latter contains the same packages that were already loaded in the former, 
>then the latter is ignored.  Either way, Tomcat-4.1.x completely ignores 
>CATALINA_HOME/shared/lib if CATALINA_BASE is set and is different from 
>CATALINA_HOME where Tomcat-5 loads CATALINA_HOME/shared/lib jars no matter 
>what.  This is behavior that I don't expect and don't like.
>
>I used the ability to separate instances to run apps which required 
>different versions of xerces.  I put xerces-1.4.4.jar in 
>CATALINA_HOME/shared/lib for apps which I use most often.  However, I have 
>other apps that need either slightly modified version of xerces-1.4.4 or 
>require xerces-2.x.x.  For those cases, I run a separate instance of 
>Tomcat using a custom set CATALNIA_BASE with a local shared/lib with the 
>appropriately versioned jars that I need for this particular app.
>
>So, this is a great feature in Tomcat-4.1.x (and, I imagine, Tomcat-4.0.x) 
>but it seems to be broken in Tomcat-5.0.  Is this new behavior in 
>Tomcat-5.0 a bug or was it intentional?  If it was intentional, can 
>someone explain the reasons for the change in behavior to that of Tomcat-4.1.x?
>
>Thanks,
>
>Jake
>
>
>--
>To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>For additional commands, e-mail: <ma...@jakarta.apache.org>