common loader in catalina.properties is wrong

Bug #1482893 reported by H.-Dirk Schmitt
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tomcat6 (Ubuntu)
Xenial
New
Medium
Unassigned
tomcat7 (Debian)
Fix Released
Unknown
tomcat7 (Ubuntu)
New
Medium
Unassigned
Xenial
New
Medium
Unassigned
Yakkety
New
Medium
Unassigned
tomcat8 (Debian)
Fix Released
Unknown
tomcat8 (Ubuntu)
Fix Released
Medium
Unassigned
Xenial
Triaged
Medium
Unassigned
Yakkety
Triaged
Medium
Unassigned

Bug Description

[Impact]

* The order of paths in common.loader does not follow the upstream tomcat recommendations. This can lead to unexpected behavior.

[Test Case]

* The broken tomcat8 will have

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

while the corrected version will have

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

in catalina.properties.

[Regression Potential]

* The primary source of regressions would be end-users relying on the old path order and thus getting a different class loaded with the 'fixed' version. However, the Ubuntu order is unspecified as being stable, and is contradictory to the public documentation.

Please fix the following line in catalina.properties in all tomcat source packages.

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

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

Following problems with the wrong statement:
1. Odering is wrong: catalina.base should overrule catalina.home here (see class loader howto below).
2. catalina.home is expanded normally to /usr/share/tomcat7, but there is no common directory - it is below
/var/lib/tomcat7 (as expanded by catalina.base).
3. ${catalina.base}/lib,${catalina.base}/lib/*.jar are pointing to non existing directories. I recommend to skip this part.

For reference see https://tomcat.apache.org/tomcat-7.0-doc/class-loader-howto.html
> The locations searched by this class loader are defined by the common.loader property in
> $CATALINA_BASE/conf/catalina.properties.
> The default setting will search the following locations in the order they are listed:
>
> unpacked classes and resources in $CATALINA_BASE/lib
> JAR files in $CATALINA_BASE/lib
> unpacked classes and resources in $CATALINA_HOME/lib
> JAR files in $CATALINA_HOME/lib

Changed in tomcat7 (Debian):
status: Unknown → New
Nish Aravamudan (nacc)
no longer affects: tomcat7
Nish Aravamudan (nacc)
Changed in tomcat6 (Ubuntu Yakkety):
status: New → Invalid
Changed in tomcat6 (Ubuntu):
status: New → Invalid
Revision history for this message
Nish Aravamudan (nacc) wrote :

Debian (and thus Zesty-Proposed which is syncing currently) is at 8.5.9-1 and has this fixed.

Changed in tomcat8 (Ubuntu):
status: New → Fix Committed
Revision history for this message
Nish Aravamudan (nacc) wrote :

Please test tomcat8 https://launchpad.net/~nacc/+archive/ubuntu/tomcat8v2 8.0.32-1ubuntu1.3~ppa1.

Changed in tomcat8 (Debian):
status: Unknown → Fix Released
Nish Aravamudan (nacc)
Changed in tomcat8 (Ubuntu Xenial):
status: New → In Progress
Changed in tomcat8 (Ubuntu Yakkety):
status: New → In Progress
Nish Aravamudan (nacc)
description: updated
Mathew Hodson (mhodson)
Changed in tomcat8 (Ubuntu):
importance: Undecided → Medium
status: Fix Committed → Fix Released
Changed in tomcat8 (Ubuntu Xenial):
importance: Undecided → Medium
Changed in tomcat8 (Ubuntu Yakkety):
importance: Undecided → Medium
Mathew Hodson (mhodson)
no longer affects: tomcat6 (Ubuntu)
no longer affects: tomcat6 (Ubuntu Yakkety)
Changed in tomcat6 (Ubuntu Xenial):
importance: Undecided → Medium
Changed in tomcat7 (Ubuntu):
importance: Undecided → Medium
Changed in tomcat7 (Ubuntu Xenial):
importance: Undecided → Medium
Changed in tomcat7 (Ubuntu Yakkety):
importance: Undecided → Medium
Changed in tomcat8 (Ubuntu Xenial):
status: In Progress → Triaged
Changed in tomcat8 (Ubuntu Yakkety):
status: In Progress → Triaged
Changed in tomcat7 (Debian):
status: New → 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.