Tomcat 6 does not respect CATALINA_BASE/lib

Bug #324212 reported by Magne Rasmussen on 2009-02-02
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tomcat6 (Ubuntu)
Thierry Carrez

Bug Description

Binary package hint: tomcat6

Tomcat6 ignores any libraries placed in CATALINA_BASE/lib.

As commented by Thierry Carrez in
    Tomcat6 is run with CATALINA_HOME set to /usr/share/tomcat6 and CATALINA_BASE set
    to /var/lib/tomcat6. If you read the Tomcat RUNNING.txt doc (available at
    /usr/share/doc/tomcat6-common/RUNNING.txt.gz) you'll see that Tomcat6 is looking at
    libraries at CATALINA_HOME/lib and doesn't look into CATALINA_BASE/lib. So the current
    behavior is following the spec.

This is confusing, since every other directory (bin, conf, logs, webapps, work, and temp) is respected in CATALINA_BASE, and especially since the CATALINA_BASE/lib directory exists. It also makes it impossible to run two instances of Tomcat with conflicting libraries.

I propose that Tomcat6 also uses CATALINA_BASE/lib (before, or instead of, CATALINA_HOME/lib) when searching for classes.

Distro/package versions:
Ubuntu 8.10
tomcat6*: 6.0.18-0ubuntu3.1

Related branches

Thierry Carrez (ttx) wrote :

I agree that having a /var/lib/tomcat6/lib directory that is just ignored is very confusing.

However I would not change Tomcat behavior from upstream design and make it consider two directories when looking for libraries. Not only would that involve some heavy patch into bootstrap.jar, it would also introduce a change in how Tomcat usually works.

I'd rather fix the confusion by removing /var/lib/tomcat6/lib and also the lib subdirectory in instances created by tomcat6-instance-create.

Changed in tomcat6:
importance: Undecided → Medium
status: New → Triaged
Thierry Carrez (ttx) on 2009-02-23
Changed in tomcat6:
status: Triaged → In Progress
Thierry Carrez (ttx) wrote :
Changed in tomcat6:
assignee: nobody → tcarrez
importance: Medium → Low
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package tomcat6 - 6.0.18-0ubuntu6

tomcat6 (6.0.18-0ubuntu6) jaunty; urgency=low

  * Added debian/patches/tcnative-ipv6-fix-43327.patch to fix incompatibility
    between libtcnative-1 and ipv6 (fixes LP: #287645)
  * No longer create confusing /var/lib/tomcat6/lib or lib subdirectory in
    private instances, since they are ignored (LP: #324212)

 -- Thierry Carrez <email address hidden> Mon, 23 Feb 2009 10:16:37 +0000

Changed in tomcat6:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers