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 1363887

Summary: The tomcat-tool-wrapper script is broken
Product: Red Hat Enterprise Linux 7 Reporter: Coty Sutherland <csutherl>
Component: tomcatAssignee: Coty Sutherland <csutherl>
Status: POST --- QA Contact: tomcat-qe
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.2CC: alee, coolsvap, csutherl, extras-qa, ivan.afonichev, java-sig-commits, krzysztof.daniel
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1363884
: 1364067 (view as bug list) Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1363884    
Bug Blocks: 1364067    

Description Coty Sutherland 2016-08-03 20:15:50 UTC
+++ This bug was initially created as a clone of Bug #1363884 +++

Description of problem:
The tomcat-tool-wrapper provided by the tomcat package doesn't work.

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

How reproducible:
Every time.

Steps to Reproduce:
1. Install tomcat via `yum install tomcat`
2. Execute the command and observe:

[coty@localhost tomcat]$ tomcat-tool-wrapper -server org.apache.catalina.realm.RealmBase -a md5 test
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tomcat/util/ExceptionUtils
	at org.apache.catalina.startup.Tool.main(
Caused by: java.lang.ClassNotFoundException: org.apache.tomcat.util.ExceptionUtils
	at java.lang.ClassLoader.loadClass(
	at sun.misc.Launcher$AppClassLoader.loadClass(
	at java.lang.ClassLoader.loadClass(
	... 1 more
ABRT problem creation: 'success'

Actual results:
A CNFE is thrown because the ExceptionUtils class is not in the classpath.

Expected results:
[coty@localhost tomcat]$ tomcat-tool-wrapper -server org.apache.catalina.realm.RealmBase -a md5 test

Comment 1 Coty Sutherland 2016-08-03 20:16:57 UTC
Unlike the Fedora version (which is tomcat8), this one just needs the following adjustment:

diff --git a/tomcat-7.0-tool-wrapper.script b/tomcat-7.0-tool-wrapper.script
index 2640ce2..a43568b 100644
--- a/tomcat-7.0-tool-wrapper.script
+++ b/tomcat-7.0-tool-wrapper.script
@@ -34,7 +34,7 @@ export CLASSPATH
-BASE_JARS="commons-daemon tomcat/catalina servlet"
+BASE_JARS="commons-daemon tomcat/catalina servlet tomcat/tomcat-util tomcat/tomcat-coyote"
 # Set parameters
 set_classpath $BASE_JARS