See https://issues.jenkins-ci.org/browse/JENKINS-7702 and http://issues.gradle.org/browse/GRADLE-1245 for background. Reproduced in 6.0.36 though reported also in Tomcat 7. If you set an environment variable $JAVA_OPTS (say, ‘export JAVA_OPTS=-server’) before running startup.sh, the Catalina JVM will include an environment variable JAVA_OPTS set to e.g. ‘-server -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager’. (This is not true if you do _not_ set JAVA_OPTS yourself: catalina.sh will modify a local shell variable but it does not export it.) Normally this is harmless. But if the web application happens to fork an external process which happens to be one of the many Java applications that interpret $JAVA_OPTS when defined as JVM parameters, and that application uses java.util.logging at any point, then that application will generally crash because ClassLoaderLogManager is not in its classpath. Indeed we did not really want to be passing -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager to the subprocess. If the user decided to specify some JAVA_OPTS for Tomcat, we should either pass this var unmodified to the JVM, or not pass it at all. The fix seems simple enough (patch format upon request): in catalina.sh, replace if [ -z "$LOGGING_MANAGER" ]; then JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager" else JAVA_OPTS="$JAVA_OPTS $LOGGING_MANAGER" fi with if [ -z "$LOGGING_MANAGER" ]; then LOGGING_MANAGER=-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager fi CATALINA_JAVA_OPTS="$JAVA_OPTS $LOGGING_MANAGER" and then replace subsequent references to $JAVA_OPTS with $CATALINA_JAVA_OPTS. Optionally also unset JAVA_OPTS since any JVM options specified for the web server are likely to be inappropriate for other Java processes it spawns (though https://github.com/jenkinsci/gradle-plugin/pull/2 suggests otherwise). The workaround in the web application is to sanitize the JAVA_OPTS environment variable before forking the subprocess, deleting the ClassLoaderLogManager configuration if found.
You are doing it wrong. The proper way to specify JAVA_OPTS value is to use a $CATALINA_BASE/bin/setenv.sh file. There is no need to mark the variable for "export" there. Though I think it is easy to change catalina.sh here to avoid your issues, so I am marking it as an enhancement.
Created attachment 29985 [details] 2013-02-24_tc6_54601.patch Patch for Tomcat 6 - backport of r1449406
Fixed in 7.0 by r1449412 , will be in 7.0.38. Proposed for 6.0.
This was fixed in Tomcat 6 in April 2013 by r1476739 and is included in 6.0.37.