Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1058931 - tomcat version command fails in jbossews-2.0 cartridge
Summary: tomcat version command fails in jbossews-2.0 cartridge
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Image
Version: 2.2.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: ---
Assignee: Jason DeTiberus
QA Contact: libra bugs
Depends On:
TreeView+ depends on / blocked
Reported: 2014-01-28 18:49 UTC by
Modified: 2017-01-13 22:46 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2017-01-13 22:46:01 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description 2014-01-28 18:49:18 UTC
Description of problem: When running jbossews/bin/tomcat version inside of an application, the command fails with the following error: 
Error: Could not find or load main class org.apache.catalina.util.ServerInfo

Version-Release number of selected component (if applicable): jbossews-2.0 cartridge

How reproducible:
Can be easily reproduced. Error occurs 100% of the time.

Steps to Reproduce:
1. rhc app-create a1 jbossews-2.0
2. rhc ssh a1
3. cd jbossews/bin
4. ./tomcat version

Actual results:
Error: Could not find or load main class org.apache.catalina.util.ServerInfo

Expected results:
Server version: Apache Tomcat/7.0.40
Server built:   Jun 20 2013 06:12:40
Server number:  7.0.40-5_patch_01.ep6.el6.Red_Hat_EWS
OS Name:        Linux
OS Version:     2.6.32-431.3.1.el6oso.bz844450v4.x86_64
Architecture:   i386
JVM Version:    1.7.0_51-mockbuild_2014_01_10_10_25-b00
JVM Vendor:     Oracle Corporation

Additional info:
Issue arises because the command sets the classpath to be ${CATALINA_HOME}/lib/catalina.jar, but CATALINA_HOME is an empty string, and the catalina.jar doesn't exist anywhere within the gear (find . -name catalina.* from the gears home dir did not find the jar). However, the catalina.jar is located in  /usr/share/java/tomcat7 on the node.

Comment 3 Balazs Varga 2014-07-31 15:35:43 UTC
As a workaround one is able to run tomcat version with CATALINA_HOME specified:

$ CATALINA_HOME=$OPENSHIFT_JBOSSEWS_DIR jbossews/bin/tomcat version

I'm not sure we should change this in the tomcat script itself, it usually get these values from the control script[1] which is not supports version command at the moment (and probably never won't).

Imho we should close this as won't fix.


Comment 4 Rory Thrasher 2017-01-13 22:46:01 UTC
OpenShift Enterprise v2 has officially reached EoL.  This product is no longer supported and bugs will be closed.

Please look into the replacement enterprise-grade container option, OpenShift Container Platform v3.

More information can be found here:

Note You need to log in before you can comment on or make changes to this bug.