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

Tomcat 7/8 RPM: obsolete digest script

    XMLWordPrintable

Details

    Description

      The digest scripts in tomcat7 and tomcat8 are identical and contains these bugs, which prevents them in correct running:

           14 # Get the tomcat config (use this for environment specific settings)
           15 if [ -z "${TOMCAT_CFG}" ]; then
           16     TOMCAT_CFG="/etc/tomcat6/tomcat6.conf"
           17 fi
      

      Reference to tomcat7 and tomcat8 configuration is needed.

      Lines:

      	37 BASE_JARS="commons-daemon tomcat6/catalina servlet"
      	40 set_classpath $BASE_JARS
      

      leads to warnings and error, when script is run:

      /usr/bin/build-classpath: Could not find commons-daemon Java extension for this JVM
      /usr/bin/build-classpath: Could not find tomcat6 Java extension for this JVM
      /usr/bin/build-classpath: Could not find servlet Java extension for this JVM
      /usr/bin/build-classpath: error: Some specified jars were not found
      

      And missing CLASSPATH jars leads to exception, when scripts is run :

      Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tomcat/util/ExceptionUtils
      	at org.apache.catalina.startup.Tool.main(Unknown Source)
      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
      

      Complete output of tomcat7-digest script with updated reference to correct tomcat7.conf file:

      [commandline]$ tomcat7-digest -a md5 test
      /usr/bin/build-classpath: Could not find commons-daemon Java extension for this JVM
      /usr/bin/build-classpath: Could not find tomcat6 Java extension for this JVM
      /usr/bin/build-classpath: Could not find servlet Java extension for this JVM
      /usr/bin/build-classpath: error: Some specified jars were not found
      Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tomcat/util/ExceptionUtils
      	at org.apache.catalina.startup.Tool.main(Unknown Source)
      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
      

      When the CLASSPATH variable is updated:

      [commandline]$ CLASSPATH=$CLASSPATH:/usr/share/tomcat7/lib/tomcat-util.jar:/usr/share/tomcat7/lib/tomcat-coyote.jar:/usr/share/tomcat7/lib/catalina.jar:/usr/share/tomcat7/lib/servlet-api.jar tomcat7-digest -a md5 test
      /usr/bin/build-classpath: Could not find commons-daemon Java extension for this JVM
      /usr/bin/build-classpath: Could not find tomcat6 Java extension for this JVM
      /usr/bin/build-classpath: Could not find servlet Java extension for this JVM
      /usr/bin/build-classpath: error: Some specified jars were not found
      test:098f6bcd4621d373cade4e832627b4f6
      

      Which is correct, but with classpath warnings.

      Digest scripts in zip files runs without problems.

      Attachments

        Activity

          People

            rhn-support-csutherl Coty Sutherland
            fgoldefu@redhat.com Filip Goldefus (Inactive)
            Bogdan Sikora Bogdan Sikora (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: