Jenkins CI server can't find ClassLoaderLogManager when executing gradle wrapper


(Steven Emmerson) #1

My Jenkins continuous integration server is having the following problem with gradle:

Started by user anonymous
Building in workspace /machine/jenkins/workspace/Life
Checkout:Life / /machine/jenkins/workspace/Life - hudson.remoting.LocalChannel@6fa4daaf
Using strategy: Default
Last Built Revision: Revision 5a664fc20d84478645f1c54fcb830c64be21da55 (origin/HEAD, origin/master)
Checkout:Life / /machine/jenkins/workspace/Life - hudson.remoting.LocalChannel@6fa4daaf
Fetching changes from 1 remote Git repository
Fetching upstream changes from https://github.com/semmerson/Life.git
Seen branch in repository origin/HEAD
Seen branch in repository origin/master
Commencing build of Revision 24bc340e50ea659d1baf71d3ab413526460116bd (origin/HEAD, origin/master)
Checking out Revision 24bc340e50ea659d1baf71d3ab413526460116bd (origin/HEAD, origin/master)
Warning : There are multiple branch changesets here
[Gradle] - Launching build.
[Life] $ /machine/jenkins/workspace/Life/gradlew build
Downloading http://services.gradle.org/distributions/gradle-1.6-bin.zip
...................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Unzipping /opt/tomcat/.gradle/wrapper/dists/gradle-1.6-bin/72srdo3a5eb3bic159kar72vok/gradle-1.6-bin.zip to /opt/tomcat/.gradle/wrapper/dists/gradle-1.6-bin/72srdo3a5eb3bic159kar72vok
Set executable permissions for: /opt/tomcat/.gradle/wrapper/dists/gradle-1.6-bin/72srdo3a5eb3bic159kar72vok/gradle-1.6/bin/gradle
Could not load Logmanager "org.apache.juli.ClassLoaderLogManager"
java.lang.ClassNotFoundException: org.apache.juli.ClassLoaderLogManager
 at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
 at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
 at java.util.logging.LogManager$1.run(LogManager.java:185)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.util.logging.LogManager.<clinit>(LogManager.java:175)
 at org.gradle.logging.internal.JavaUtilLoggingConfigurer.configure(JavaUtilLoggingConfigurer.java:36)
 at org.gradle.logging.internal.DefaultLoggingConfigurer.configure(DefaultLoggingConfigurer.java:37)
 at org.gradle.logging.internal.LoggingSystemAdapter.setLevel(LoggingSystemAdapter.java:55)
 at org.gradle.logging.internal.LoggingSystemAdapter.on(LoggingSystemAdapter.java:42)
 at org.gradle.logging.internal.DefaultLoggingManager$StartableLoggingSystem.start(DefaultLoggingManager.java:171)
 at org.gradle.logging.internal.DefaultLoggingManager.start(DefaultLoggingManager.java:60)
 at org.gradle.logging.internal.DefaultLoggingManager.start(DefaultLoggingManager.java:31)
 at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:167)
 at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:139)
 at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
 at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
 at org.gradle.launcher.Main.doAction(Main.java:48)
 at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
 at org.gradle.launcher.Main.main(Main.java:39)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:601)
 at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)
 at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32)
 at org.gradle.launcher.GradleMain.main(GradleMain.java:26)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:601)
 at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:33)
 at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:130)
 at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
:compileJava
:processResources UP-TO-DATE
:classes
:jar
:assemble
:compileTestJava
:processTestResources UP-TO-DATE
:testClasses
:test
:check
:build
  BUILD SUCCESSFUL
  Total time: 22.102 secs
Build step 'Invoke Gradle script' changed build result to SUCCESS
Recording test results
Sending e-mails to: X@X.X
Finished: SUCCESS

Any ideas?


Could not load Logmanager
(Peter Niederwieser) #2

It’s suspicious that the Gradle wrapper gets installed into ‘opt/tomcat’. I don’t know why that would be happening, but I do know that the Jenkins Gradle plugin used to set strange Gradle user homes. From what I’ve heard, this has been solved in recent versions of the plugin. So first thing I’d do is to upgrade to the latest Jenkins Gradle plugin.


(Steven Emmerson) #3

Peter,

I’ve been doing some more research and I think the problem might have more to do with Tomcat than with the gradle wrapper. Non-gradle users are having this same problem. Apparently, setting the JAVA_HOME environment variable correctly for our Tomcat server might fix the problem. FWIW, “/opt/tomcat” is the home-directory of our Tomcat installation.

I’m using the wrapper from gradle 1.6.


(Peter Niederwieser) #4

I understand what ‘/opt/tomcat/’ is, I just don’t understand why the Gradle wrapper’s Gradle distribution gets installed there.