Uploaded image for project: 'JBoss Web Server'
  1. JBoss Web Server
  2. JWS-771

tomcat-tool-wrapper is missing tomcat-api.jar on the CLASSPATH

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • JWS 5.0_RHEL DR2
    • JWS 3.1.0 GA, JWS 5.0_RHEL DR1
    • rpm, tomcat
    • None
    • Documentation (Ref Guide, User Guide, etc.), Release Notes, Compatibility/Configuration, User Experience
    • Workaround Exists
    • Hide

      Add the tomcat-api.jar to the script's /usr/bin/tomcat8-tool-wrapper classpath by putting:

      CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/lib/tomcat-api.jar"
      

      between the following two lines:

      CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/tomcat-juli.jar"
      export CLASSPATH
      
      Show
      Add the tomcat-api.jar to the script's /usr/bin/tomcat8-tool-wrapper classpath by putting: CLASSPATH= "${CLASSPATH}:${CATALINA_HOME}/lib/tomcat-api.jar" between the following two lines: CLASSPATH= "${CLASSPATH}:${CATALINA_HOME}/bin/tomcat-juli.jar" export CLASSPATH
    • Hide

      1) Install the tomcat8 RPM from SP1
      2) Try and run the tool

      $ tomcat8-tool-wrapper -server org.apache.catalina.realm.RealmBase -a md5 test
      

      3) Observe the failure

      Show
      1) Install the tomcat8 RPM from SP1 2) Try and run the tool $ tomcat8-tool-wrapper -server org.apache.catalina.realm.RealmBase -a md5 test 3) Observe the failure

      The tomcat8-tool-wrapper script doesn't work because it's missing a JAR on it's classpath.

      $ tomcat8-tool-wrapper -server org.apache.catalina.realm.RealmBase -a md5 test
      Jul 12, 2017 12:25:38 PM org.apache.catalina.startup.Tool main
      SEVERE: Exception locating main() method
      java.lang.NoClassDefFoundError: org/apache/tomcat/ContextBind
      	at java.lang.ClassLoader.defineClass1(Native Method)
      	at java.lang.ClassLoader.defineClass(ClassLoader.java:803)
      	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
      	at java.net.URLClassLoader.defineClass(URLClassLoader.java:442)
      	at java.net.URLClassLoader.access$100(URLClassLoader.java:64)
      	at java.net.URLClassLoader$1.run(URLClassLoader.java:354)
      	at java.net.URLClassLoader$1.run(URLClassLoader.java:348)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at java.net.URLClassLoader.findClass(URLClassLoader.java:347)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
      	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:312)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
      	at java.lang.Class.getDeclaredMethods0(Native Method)
      	at java.lang.Class.privateGetDeclaredMethods(Class.java:2625)
      	at java.lang.Class.getMethod0(Class.java:2866)
      	at java.lang.Class.getMethod(Class.java:1676)
      	at org.apache.catalina.startup.Tool.main(Tool.java:216)
      Caused by: java.lang.ClassNotFoundException: org.apache.tomcat.ContextBind
      	at java.net.URLClassLoader$1.run(URLClassLoader.java:359)
      	at java.net.URLClassLoader$1.run(URLClassLoader.java:348)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at java.net.URLClassLoader.findClass(URLClassLoader.java:347)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
      	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:312)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
      	... 17 more
      

        1. JWS-771.patch
          0.4 kB
          Coty Sutherland

              rhn-support-csutherl Coty Sutherland
              rhn-support-csutherl Coty Sutherland
              Jan Onderka Jan Onderka
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: