Bug 1364067

Summary: The tomcat-tool-wrapper script is broken
Product: [Fedora] Fedora EPEL Reporter: Coty Sutherland <csutherl>
Component: tomcatAssignee: Coty Sutherland <csutherl>
Status: CLOSED ERRATA QA Contact: Michal Karm Babacek <mbabacek>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: el6CC: alee, coolsvap, csutherl, extras-qa, ivan.afonichev, java-sig-commits, krzysztof.daniel, mbabacek, tomcat-qe, trick
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tomcat-7.0.70-2.el6 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1363887 Environment:
Last Closed: 2016-09-02 09:22:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1363884, 1363887    
Bug Blocks:    

Description Coty Sutherland 2016-08-04 12:18:34 UTC
+++ This bug was initially created as a clone of Bug #1363887 +++

+++ 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):
tomcat-7.0.65-1.el6.noarch

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(Tool.java:218)
Caused by: java.lang.ClassNotFoundException: org.apache.tomcat.util.ExceptionUtils
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 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
test:4af3bd7759edac2bd372d04c343aee12f789394ecada8c9ce6fc32555fbf5c76$1$58040d6efb505a5e2bcf7c863968a192

--- Additional comment from Coty Sutherland on 2016-08-03 16:16:57 EDT ---

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
 MAIN_CLASS="org.apache.catalina.startup.Tool"
 BASE_OPTIONS=""
 BASE_FLAGS="-Dcatalina.home=\"$CATALINA_HOME\""
-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

Comment 2 Fedora Update System 2016-08-05 20:10:39 UTC
tomcat-7.0.70-2.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-3ff1f4485b

Comment 3 Fedora Update System 2016-08-09 02:17:48 UTC
tomcat-7.0.70-2.el6 has been pushed to the Fedora EPEL 6 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-3ff1f4485b

Comment 4 Fedora Update System 2016-09-01 16:20:03 UTC
tomcat-7.0.70-2.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.

Comment 5 Fedora Update System 2016-09-02 09:21:51 UTC
tomcat-7.0.70-2.el6 has been pushed to the Fedora EPEL 6 stable repository. If problems still persist, please make note of it in this bug report.