catalina.properties use hard references to /var/lib/tomcat7/

Bug #1068405 reported by H.-Dirk Schmitt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tomcat6 (Ubuntu)
Fix Released
Low
Unassigned
tomcat7 (Debian)
Fix Released
Unknown
tomcat7 (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

The file /usr/share/tomcat7/skel/conf/catalina.properties (and also /etc/tomcat7/catalina.properties) has hard references to /var/lib/tomcat7/.

If /var/lib/tomcat7/{common,server,shared} contains a jar for one tomcat7 instance, this leaks to all other installations.

To avoid this problem the property reference ${catalina.base} should be used.
A second tomcat instance can now set $CATALINA_BASE to something else (as /var/lib/tomcat7).

Tags: precise
Revision history for this message
H.-Dirk Schmitt (dirk-computer42) wrote :

Verified for :
 tomcat7 7.0.26-1ubuntu1.1 Servlet and JSP engine
 tomcat6 6.0.35-1ubuntu3 Servlet and JSP engine

tags: added: precise
Changed in tomcat7 (Debian):
status: Unknown → New
Revision history for this message
James Page (james-page) wrote :

Thanks for taking the time to report this bug.

I can see how /var/lib/tomcat7/* could leak into instances created using tomcat7-instance-create; Marking 'Low' and 'Triaged'

Changed in tomcat6 (Ubuntu):
status: New → Triaged
Changed in tomcat7 (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
importance: Medium → Low
Changed in tomcat6 (Ubuntu):
importance: Undecided → Low
Changed in tomcat7 (Debian):
status: New → Fix Released
Revision history for this message
Edward Glowacki (glowack2) wrote :

The fix for this from Debian has broken the class loader.

Per this bug report, /var/lib/tomcat7 should be replaced with ${catalina.base}, however it appears that when they fixed it they used ${catalina.home} instead. This affects all 3 loaders (common, server, shared) as defined in /etc/tomcat7/catalina.properties.

As a result, placing files in /var/lib/tomcat7/common (or .../server or .../shared or any of their classes/ subfolders) will no longer result in them being loaded by tomcat.

Broken for Ubuntu 13.10 with tomcat7 7.0.42-1.

Revision history for this message
Gianfranco Costamagna (costamagnagianfranco) wrote :

Edward how do you suggest to fix?

Revision history for this message
H.-Dirk Schmitt (dirk-computer42) wrote :

The wrong fix is also included in ubuntu - so I close the bug report here.

The problem mentioned from Edward Glowcki in comment #3 is covered b
y https://bugs.launchpad.net/debian/+source/tomcat7/+bug/1482893

Changed in tomcat6 (Ubuntu):
status: Triaged → Fix Released
Changed in tomcat7 (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.