You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Baird, Josh" <jb...@follett.com> on 2015/07/15 19:44:04 UTC

CATALINA_BASE/lib on tomcat6 (RHEL6)

Hi,

I am running RHEL6's distribution of Tomcat (tomcat6-6.0.24-80.el6.x86_64).  I'm trying to provision multiple Tomcat instances on the same server.  The 'RUNNING' [1] doc states that JAR libraries should be loaded from both $CATALINA_HOME/lib and $CATALINA_BASE/lib (with BASE being preferred).  However, in our testing, only JARs from $CATALINA_HOME/lib (/usr/share/tomcat6/lib on RHEL6) are being loaded.  JARs in $CATALINA_BASE/lib are not being loaded at all.

CATALINA_HOME and CATALINA_BASE are set properly in the script that starts Tomcat.  I have also verified that my catalina.properties file specifies both:

common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar

Does anyone have any ideas on why JARs in $CATALINA_BASE/lib are not being loaded?  

[1] https://tomcat.apache.org/tomcat-6.0-doc/RUNNING.txt

Thanks,

Josh


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: CATALINA_BASE/lib on tomcat6 (RHEL6)

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Josh,

On 7/16/15 8:58 AM, Baird, Josh wrote:
> Yes, I suspect this is due to RHEL's re-package.
> 
> $CATALINA_HOME = /usr/share/tomcat6 $CATALINA_BASE =
> /srv/tomcat/myapp
> 
> $CATALINA_HOME/conf/catalina.properties does exist and contains
> the proper common.loader line.

Is /etc/tomcat6 a symlink to /usr/share/tomcat6? Or is
/etc/tomcat6/catalina.properties a symlink to
/usr/share/tomcat6/config/catalina.properties?

> However, unless I manually copy 
> $CATALINA_HOME/conf/catalina.properties into $CATALINA_BASE/conf, 
> classes are not being loaded from $CATALINA_BASE/lib, presumably
> because common.loader is incorrect due to the lack of 
> $CATALINA_BASE/conf/catalina.properties.

Hmm... I've never used CATALINA_BASE/conf/catalina.properties, so I
always assumed that CATALINA_HOME/conf/catalina.properties would be
used as a fall-back, but that's not the case. (I've been using Tomcat
for a long time and even I never noticed this behavior.)

Looking at the Tomcat 6 source code (and in Tomcat 8, so nothing has
changed for a while), the CatalinaProperties class loads its
properties from CATALINA_BASE and, failing that, uses the ClassLoader
to load org/apache/catalina/startup/catalina.properties from wherever
it might be in the class path. That turns out to be inside of
catalina.jar, so maybe whatever is on the filesystem isn't doing
anything at all for you (unless you copy the file into
CATALINA_BASE/conf, of course).

> I verified this by sticking "common.loader: <%= 
> System.getProperty("common.loader") %>" in a test JSP page  and 
> invoking it with and without catalina.properties in 
> $CATALINA_BASE/conf.
> 
> I have a ticket open with RHEL and they will hopefully be able to 
> tell me the expected behavior here, since it obviously differs from
> a 'stock' Tomcat6 installation.

I'd be surprised if RHEL is changing the packaging of Tomcat's JAR
files -- meaning modifying the stock catalina.properties that's in
catalina.jar -- but it's certainly possible.

Check to see what's in there; it will probably shed some light.

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJVp8FxAAoJEBzwKT+lPKRY+XYP/RzvOBPVys6y5Yextv7Om9bX
QyHw45FpQkht2h61YjDarZHzfO801A2QoW6ixDsD6uRpxSHL4RhyzlnK+1U+fSMj
PU1O+XEzS96/8D3ACYR2JyES1PUr4rBsn+2m0vOYh8Vcd1g6gpfqyo+la92UNmXE
i/6O0UhLPt7ICAFvyq0LRo8V9VTSlLyu/bmAc8rIA2vGFH/+sng2amaej7fY1QCC
tIgWoxYqF80nqSAIOYNrSz3j0B53GOuRVxkhgDo7+WvnWoccOFPFYtw087Xx+Me6
8i2ZrNELnUN45cLBE3xvQI0XEb4AgdNPnTfoxrXK3qR7cyNMU3PdDwBYjSOI+Kne
/WOfioY4EA1dM1Mts0ln6Q5OLC/ANiFLsFlRjNciIuW8X1Ub0mmP7ykBQdNIgz5k
2RPVwXMD8PG3CFhvs4imryXQOcqf4OMum37FjmTeedJDWxXAdNADSqFZfj5BdEf6
hq+kVUtsz3eq/vk0LIP21u/VVFRP6IOaHfoKbXX6i3GwLy0n1anshrmi+z9MGgqU
Po5DMcPro5iTb2rlR8BpGWvII7EbS64d+Hg83M4tcYBIt6XVM1DkqdvqiLvG9r4F
iTQO+yFI6ABvwWp7dLU1kYUTnwhvw4/cfAb/14HbmKumkTW4oOGvFBYoll8uRsqi
X9Fen5Yh5AReOYmmbaNp
=MWro
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: CATALINA_BASE/lib on tomcat6 (RHEL6)

Posted by "Baird, Josh" <jb...@follett.com>.
Chris,

Yes, I suspect this is due to RHEL's re-package.  

$CATALINA_HOME = /usr/share/tomcat6
$CATALINA_BASE = /srv/tomcat/myapp

$CATALINA_HOME/conf/catalina.properties does exist and contains the proper common.loader line.  However, unless I manually copy $CATALINA_HOME/conf/catalina.properties into $CATALINA_BASE/conf, classes are not being loaded from $CATALINA_BASE/lib, presumably because common.loader is incorrect due to the lack of $CATALINA_BASE/conf/catalina.properties.

I verified this by sticking "common.loader: <%= System.getProperty("common.loader") %>" in a test JSP page  and invoking it with and without catalina.properties in $CATALINA_BASE/conf.

I have a ticket open with RHEL and they will hopefully be able to tell me the expected behavior here, since it obviously differs from a 'stock' Tomcat6 installation.

(apologies for top-posting)

Thanks,

Josh

> -----Original Message-----
> From: Christopher Schultz [mailto:chris@christopherschultz.net]
> Sent: Thursday, July 16, 2015 9:48 AM
> To: Tomcat Users List
> Subject: Re: CATALINA_BASE/lib on tomcat6 (RHEL6)
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
> 
> Josh,
> 
> On 7/16/15 8:13 AM, Baird, Josh wrote:
> > Do you know if this is expected behavior for Tomcat6?
> 
> No, it's not. But RHEL re-packages Tomcat and does weird things to it.
> 
> > Should I have to specify 'common.loader' in a separate
> > $CATALINA_BASE/conf/catalina.properties file?
> 
> What is the value of $CATALINA_HOME? CATALINA_BASE?
> 
> Tomcat will look in CATALINA_BASE/conf and CATALINA_HOME/conf for
> catalina.properties. If CATALINA_HOME is set to /etc/tomcat6, then Tomcat
> is going to try to look in /etc/tomcat6/conf. Does that exist?
> 
> If not, then you'll have to copy catalina.properties into your
> CATALINA_BASE/conf.
> 
> I'm not sure how RHEL expects you to do things, and I'm not familiar enough
> with the layout to comment on why it does or does not work.
> 
> If you want to know why it doesn't work on RHEL, you'll have to ask the RHEL
> packagers... the stock Tomcat distribution works without any problems.
> 
> - -chris
> 
> >> -----Original Message----- From: Baird, Josh
> >> [mailto:jbaird@follett.com] Sent: Wednesday, July 15, 2015 4:07 PM
> >> To: Tomcat Users List Subject: RE: CATALINA_BASE/lib on
> >> tomcat6 (RHEL6)
> >>
> >> Hi,
> >>
> >> Thanks for the tip!  It turns out that the 'stock'
> >> catalina.properties (in /etc/tomcat6/catalina.properties) was not
> >> getting invoked for the CATALINA_BASE instance.  I copied
> >> /etc/tomcat6/catalina.properties to
> >> $CATALINA_BASE/conf/catalina.properties, and now common.loader is
> >> including $CATALINA_BASE/lib:
> >>
> >> common.loader:
> >> ${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,
> ${catalina.
> >>
> >>
> home}/lib/*.jar
> >>
> >> This differs from Tomcat7 which I have also been testing.
> >>
> >> Thanks,
> >>
> >> Josh
> >>
> >>> -----Original Message----- From: Konstantin Kolinko
> >>> [mailto:knst.kolinko@gmail.com] Sent: Wednesday, July 15, 2015
> >>> 3:43 PM To: Tomcat Users List Subject: Re: CATALINA_BASE/lib on
> >>> tomcat6 (RHEL6)
> >>>
> >>> 2015-07-15 20:44 GMT+03:00 Baird, Josh <jb...@follett.com>:
> >>>> Hi,
> >>>>
> >>>> I am running RHEL6's distribution of Tomcat (tomcat6-6.0.24-
> >> 80.el6.x86_64).
> >>> I'm trying to provision multiple Tomcat instances on the same
> >>> server. The 'RUNNING' [1] doc states that JAR libraries should be
> >>> loaded from both $CATALINA_HOME/lib and $CATALINA_BASE/lib (with
> >>> BASE being preferred).  However, in our testing, only JARs from
> >>> $CATALINA_HOME/lib (/usr/share/tomcat6/lib on RHEL6) are being
> >>> loaded. JARs in $CATALINA_BASE/lib are not being loaded at all.
> >>>>
> >>>> CATALINA_HOME and CATALINA_BASE are set properly in the script
> that
> >>> starts Tomcat.  I have also verified that my catalina.properties
> >>> file specifies both:
> >>>>
> >>>> common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${cat
> a
> >>>>
> >>>>
> li na.home}/lib,${catalina.home}/lib/*.jar
> >>>>
> >>>> Does anyone have any ideas on why JARs in $CATALINA_BASE/lib are
> >>>> not
> >>> being loaded?
> >>>>
> >>>> [1] https://tomcat.apache.org/tomcat-6.0-doc/RUNNING.txt
> >>>
> >>>
> >>> The online documentation is for the current version of Tomcat.
> >>> For Tomcat 6 that is 6.0.44.
> >>>
> >>> Maybe that is not your configuration file.  Maybe your jar file is
> >>> not
> >> readable.
> >>>
> >>> Note that all values from catalina.properties file are exposed as
> >>> system properties. You may try the following JSP page to display the
> >>> values:
> >>>
> >>> [[[ <%@page contentType="text/plain;charset=UTF-8" %>
> >>> common.loader: <%= System.getProperty("common.loader") %>
> >>> catalina.home: <%= System.getProperty("catalina.home") %>
> >>> catalina.base: <%= System.getProperty("catalina.base") %> ]]]
> >>>
> >>> Best regards, Konstantin Kolinko
> >>>
> >>> --------------------------------------------------------------------
> - -
> >>>
> >>>
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >>> For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >
> > ---------------------------------------------------------------------
> >
> >
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> -----BEGIN PGP SIGNATURE-----
> Comment: GPGTools - http://gpgtools.org
> 
> iQIcBAEBCAAGBQJVp7YeAAoJEBzwKT+lPKRYAnIP/2FEKmBUKnrW3j3ACVRh9
> rqT
> xM+rhdVexTpLloJtOnaB6EpOgEVhozxGmpgGl3K0gp+oFPmrAyyGu3RPWKYX
> yW0J
> Pf9hGv0BXxAwJfTUC7jVbFLc5SKcUoOJoQj4c59D3he6qlYdOW3Jl+STWV66y6I
> u
> DXIpbEtYXsMrIf32sS3RpxzXpufZsqXnNYGd3/GidCKrC93sk2D7oFppEgcCNNrG
> kJv7keRmzZwI7YywX8eICkyYc1GLdbWJ6DXraaEd/xhPBGMS2rvsasqtTo3yplQ
> O
> cT+Xi/VsDQuFLK/ScN+49i1+QONUf/jQ4id3jvcZ+Yz0HJCUMv4JdwIjFzPWtZCv
> P5oh4DC+xpow5i9dQgHfEAzD8zBeQp093iYNRYnU2Mn+1rLVJh8F02kh8nSOs
> G+Z
> 32bGuDR90TgtfRSYbKWMpRdLWIbuB7d9a0kddM989VGE5kWHhPDRL8ykdcv
> HPJyw
> V2+gj3NHGRnVumtMD8y66KFFvwsw4YexEIm8qZ/fO9xj9OIY0NIYJJ50bta80ab
> V
> 07EHg0/tVw7rboZ3grNTa8Nz90xSbAvMK8luD6FovzYsmT+lg85qrmpMlto3CyV
> d
> ZSZbIDoXZpxDmfMDkGcIZn4IFcUakEIhuoy2JaT0nLFSjV50Z+CpKhmfQBO9NU
> oq
> UEWwCPMakZu3qhPMSnyN
> =TESw
> -----END PGP SIGNATURE-----
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org


Re: CATALINA_BASE/lib on tomcat6 (RHEL6)

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Josh,

On 7/16/15 8:13 AM, Baird, Josh wrote:
> Do you know if this is expected behavior for Tomcat6?

No, it's not. But RHEL re-packages Tomcat and does weird things to it.

> Should I have to specify 'common.loader' in a separate 
> $CATALINA_BASE/conf/catalina.properties file?

What is the value of $CATALINA_HOME? CATALINA_BASE?

Tomcat will look in CATALINA_BASE/conf and CATALINA_HOME/conf for
catalina.properties. If CATALINA_HOME is set to /etc/tomcat6, then
Tomcat is going to try to look in /etc/tomcat6/conf. Does that exist?

If not, then you'll have to copy catalina.properties into your
CATALINA_BASE/conf.

I'm not sure how RHEL expects you to do things, and I'm not familiar
enough with the layout to comment on why it does or does not work.

If you want to know why it doesn't work on RHEL, you'll have to ask
the RHEL packagers... the stock Tomcat distribution works without any
problems.

- -chris

>> -----Original Message----- From: Baird, Josh
>> [mailto:jbaird@follett.com] Sent: Wednesday, July 15, 2015 4:07
>> PM To: Tomcat Users List Subject: RE: CATALINA_BASE/lib on
>> tomcat6 (RHEL6)
>> 
>> Hi,
>> 
>> Thanks for the tip!  It turns out that the 'stock'
>> catalina.properties (in /etc/tomcat6/catalina.properties) was not
>> getting invoked for the CATALINA_BASE instance.  I copied
>> /etc/tomcat6/catalina.properties to 
>> $CATALINA_BASE/conf/catalina.properties, and now common.loader
>> is including $CATALINA_BASE/lib:
>> 
>> common.loader: 
>> ${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,
${catalina.
>>
>> 
home}/lib/*.jar
>> 
>> This differs from Tomcat7 which I have also been testing.
>> 
>> Thanks,
>> 
>> Josh
>> 
>>> -----Original Message----- From: Konstantin Kolinko
>>> [mailto:knst.kolinko@gmail.com] Sent: Wednesday, July 15, 2015
>>> 3:43 PM To: Tomcat Users List Subject: Re: CATALINA_BASE/lib on
>>> tomcat6 (RHEL6)
>>> 
>>> 2015-07-15 20:44 GMT+03:00 Baird, Josh <jb...@follett.com>:
>>>> Hi,
>>>> 
>>>> I am running RHEL6's distribution of Tomcat (tomcat6-6.0.24-
>> 80.el6.x86_64).
>>> I'm trying to provision multiple Tomcat instances on the same
>>> server. The 'RUNNING' [1] doc states that JAR libraries should
>>> be loaded from both $CATALINA_HOME/lib and $CATALINA_BASE/lib
>>> (with BASE being preferred).  However, in our testing, only
>>> JARs from $CATALINA_HOME/lib (/usr/share/tomcat6/lib on RHEL6)
>>> are being loaded. JARs in $CATALINA_BASE/lib are not being
>>> loaded at all.
>>>> 
>>>> CATALINA_HOME and CATALINA_BASE are set properly in the
>>>> script that
>>> starts Tomcat.  I have also verified that my
>>> catalina.properties file specifies both:
>>>> 
>>>> common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${cat
a
>>>>
>>>> 
li na.home}/lib,${catalina.home}/lib/*.jar
>>>> 
>>>> Does anyone have any ideas on why JARs in $CATALINA_BASE/lib
>>>> are not
>>> being loaded?
>>>> 
>>>> [1] https://tomcat.apache.org/tomcat-6.0-doc/RUNNING.txt
>>> 
>>> 
>>> The online documentation is for the current version of Tomcat.
>>> For Tomcat 6 that is 6.0.44.
>>> 
>>> Maybe that is not your configuration file.  Maybe your jar file
>>> is not
>> readable.
>>> 
>>> Note that all values from catalina.properties file are exposed
>>> as system properties. You may try the following JSP page to
>>> display the values:
>>> 
>>> [[[ <%@page contentType="text/plain;charset=UTF-8" %> 
>>> common.loader: <%= System.getProperty("common.loader") %> 
>>> catalina.home: <%= System.getProperty("catalina.home") %> 
>>> catalina.base: <%= System.getProperty("catalina.base") %> ]]]
>>> 
>>> Best regards, Konstantin Kolinko
>>> 
>>> --------------------------------------------------------------------
- -
>>>
>>> 
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> ---------------------------------------------------------------------
>
> 
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org

iQIcBAEBCAAGBQJVp7YeAAoJEBzwKT+lPKRYAnIP/2FEKmBUKnrW3j3ACVRh9rqT
xM+rhdVexTpLloJtOnaB6EpOgEVhozxGmpgGl3K0gp+oFPmrAyyGu3RPWKYXyW0J
Pf9hGv0BXxAwJfTUC7jVbFLc5SKcUoOJoQj4c59D3he6qlYdOW3Jl+STWV66y6Iu
DXIpbEtYXsMrIf32sS3RpxzXpufZsqXnNYGd3/GidCKrC93sk2D7oFppEgcCNNrG
kJv7keRmzZwI7YywX8eICkyYc1GLdbWJ6DXraaEd/xhPBGMS2rvsasqtTo3yplQO
cT+Xi/VsDQuFLK/ScN+49i1+QONUf/jQ4id3jvcZ+Yz0HJCUMv4JdwIjFzPWtZCv
P5oh4DC+xpow5i9dQgHfEAzD8zBeQp093iYNRYnU2Mn+1rLVJh8F02kh8nSOsG+Z
32bGuDR90TgtfRSYbKWMpRdLWIbuB7d9a0kddM989VGE5kWHhPDRL8ykdcvHPJyw
V2+gj3NHGRnVumtMD8y66KFFvwsw4YexEIm8qZ/fO9xj9OIY0NIYJJ50bta80abV
07EHg0/tVw7rboZ3grNTa8Nz90xSbAvMK8luD6FovzYsmT+lg85qrmpMlto3CyVd
ZSZbIDoXZpxDmfMDkGcIZn4IFcUakEIhuoy2JaT0nLFSjV50Z+CpKhmfQBO9NUoq
UEWwCPMakZu3qhPMSnyN
=TESw
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: CATALINA_BASE/lib on tomcat6 (RHEL6)

Posted by "Baird, Josh" <jb...@follett.com>.
Konstantin,

Do you know if this is expected behavior for Tomcat6?  Should I have to specify 'common.loader' in a separate $CATALINA_BASE/conf/catalina.properties file?

Thanks,

Josh

> -----Original Message-----
> From: Baird, Josh [mailto:jbaird@follett.com]
> Sent: Wednesday, July 15, 2015 4:07 PM
> To: Tomcat Users List
> Subject: RE: CATALINA_BASE/lib on tomcat6 (RHEL6)
> 
> Hi,
> 
> Thanks for the tip!  It turns out that the 'stock' catalina.properties (in
> /etc/tomcat6/catalina.properties) was not getting invoked for the
> CATALINA_BASE instance.  I copied /etc/tomcat6/catalina.properties to
> $CATALINA_BASE/conf/catalina.properties, and now common.loader is
> including $CATALINA_BASE/lib:
> 
> common.loader:
> ${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.
> home}/lib/*.jar
> 
> This differs from Tomcat7 which I have also been testing.
> 
> Thanks,
> 
> Josh
> 
> > -----Original Message-----
> > From: Konstantin Kolinko [mailto:knst.kolinko@gmail.com]
> > Sent: Wednesday, July 15, 2015 3:43 PM
> > To: Tomcat Users List
> > Subject: Re: CATALINA_BASE/lib on tomcat6 (RHEL6)
> >
> > 2015-07-15 20:44 GMT+03:00 Baird, Josh <jb...@follett.com>:
> > > Hi,
> > >
> > > I am running RHEL6's distribution of Tomcat (tomcat6-6.0.24-
> 80.el6.x86_64).
> > I'm trying to provision multiple Tomcat instances on the same server.
> > The 'RUNNING' [1] doc states that JAR libraries should be loaded from
> > both $CATALINA_HOME/lib and $CATALINA_BASE/lib (with BASE being
> > preferred).  However, in our testing, only JARs from
> > $CATALINA_HOME/lib (/usr/share/tomcat6/lib on RHEL6) are being loaded.
> > JARs in $CATALINA_BASE/lib are not being loaded at all.
> > >
> > > CATALINA_HOME and CATALINA_BASE are set properly in the script that
> > starts Tomcat.  I have also verified that my catalina.properties file
> > specifies
> > both:
> > >
> > > common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${cata
> > > li na.home}/lib,${catalina.home}/lib/*.jar
> > >
> > > Does anyone have any ideas on why JARs in $CATALINA_BASE/lib are not
> > being loaded?
> > >
> > > [1] https://tomcat.apache.org/tomcat-6.0-doc/RUNNING.txt
> >
> >
> > The online documentation is for the current version of Tomcat.  For
> > Tomcat 6 that is 6.0.44.
> >
> > Maybe that is not your configuration file.  Maybe your jar file is not
> readable.
> >
> > Note that all values from catalina.properties file are exposed as
> > system properties.
> > You may try the following JSP page to display the values:
> >
> > [[[
> > <%@page contentType="text/plain;charset=UTF-8" %>
> > common.loader: <%= System.getProperty("common.loader") %>
> > catalina.home: <%= System.getProperty("catalina.home") %>
> > catalina.base: <%= System.getProperty("catalina.base") %> ]]]
> >
> > Best regards,
> > Konstantin Kolinko
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org


RE: CATALINA_BASE/lib on tomcat6 (RHEL6)

Posted by "Baird, Josh" <jb...@follett.com>.
Hi,

Thanks for the tip!  It turns out that the 'stock' catalina.properties (in /etc/tomcat6/catalina.properties) was not getting invoked for the CATALINA_BASE instance.  I copied /etc/tomcat6/catalina.properties to $CATALINA_BASE/conf/catalina.properties, and now common.loader is including $CATALINA_BASE/lib:

common.loader: ${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar

This differs from Tomcat7 which I have also been testing.

Thanks,

Josh

> -----Original Message-----
> From: Konstantin Kolinko [mailto:knst.kolinko@gmail.com]
> Sent: Wednesday, July 15, 2015 3:43 PM
> To: Tomcat Users List
> Subject: Re: CATALINA_BASE/lib on tomcat6 (RHEL6)
> 
> 2015-07-15 20:44 GMT+03:00 Baird, Josh <jb...@follett.com>:
> > Hi,
> >
> > I am running RHEL6's distribution of Tomcat (tomcat6-6.0.24-80.el6.x86_64).
> I'm trying to provision multiple Tomcat instances on the same server.  The
> 'RUNNING' [1] doc states that JAR libraries should be loaded from both
> $CATALINA_HOME/lib and $CATALINA_BASE/lib (with BASE being
> preferred).  However, in our testing, only JARs from $CATALINA_HOME/lib
> (/usr/share/tomcat6/lib on RHEL6) are being loaded.  JARs in
> $CATALINA_BASE/lib are not being loaded at all.
> >
> > CATALINA_HOME and CATALINA_BASE are set properly in the script that
> starts Tomcat.  I have also verified that my catalina.properties file specifies
> both:
> >
> > common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catali
> > na.home}/lib,${catalina.home}/lib/*.jar
> >
> > Does anyone have any ideas on why JARs in $CATALINA_BASE/lib are not
> being loaded?
> >
> > [1] https://tomcat.apache.org/tomcat-6.0-doc/RUNNING.txt
> 
> 
> The online documentation is for the current version of Tomcat.  For Tomcat 6
> that is 6.0.44.
> 
> Maybe that is not your configuration file.  Maybe your jar file is not readable.
> 
> Note that all values from catalina.properties file are exposed as system
> properties.
> You may try the following JSP page to display the values:
> 
> [[[
> <%@page contentType="text/plain;charset=UTF-8" %>
> common.loader: <%= System.getProperty("common.loader") %>
> catalina.home: <%= System.getProperty("catalina.home") %>
> catalina.base: <%= System.getProperty("catalina.base") %> ]]]
> 
> Best regards,
> Konstantin Kolinko
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org


Re: CATALINA_BASE/lib on tomcat6 (RHEL6)

Posted by Konstantin Kolinko <kn...@gmail.com>.
2015-07-15 20:44 GMT+03:00 Baird, Josh <jb...@follett.com>:
> Hi,
>
> I am running RHEL6's distribution of Tomcat (tomcat6-6.0.24-80.el6.x86_64).  I'm trying to provision multiple Tomcat instances on the same server.  The 'RUNNING' [1] doc states that JAR libraries should be loaded from both $CATALINA_HOME/lib and $CATALINA_BASE/lib (with BASE being preferred).  However, in our testing, only JARs from $CATALINA_HOME/lib (/usr/share/tomcat6/lib on RHEL6) are being loaded.  JARs in $CATALINA_BASE/lib are not being loaded at all.
>
> CATALINA_HOME and CATALINA_BASE are set properly in the script that starts Tomcat.  I have also verified that my catalina.properties file specifies both:
>
> common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar
>
> Does anyone have any ideas on why JARs in $CATALINA_BASE/lib are not being loaded?
>
> [1] https://tomcat.apache.org/tomcat-6.0-doc/RUNNING.txt


The online documentation is for the current version of Tomcat.  For
Tomcat 6 that is 6.0.44.

Maybe that is not your configuration file.  Maybe your jar file is not readable.

Note that all values from catalina.properties file are exposed as
system properties.
You may try the following JSP page to display the values:

[[[
<%@page contentType="text/plain;charset=UTF-8" %>
common.loader: <%= System.getProperty("common.loader") %>
catalina.home: <%= System.getProperty("catalina.home") %>
catalina.base: <%= System.getProperty("catalina.base") %>
]]]

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org