[GRADLE-1245] Hudson and org.apache.juli.ClassLoaderLogManager Created: 02/Dec/10 Updated: 16/Jan/17 Resolved: 16/Jan/17 |
|
Status: | Resolved |
Project: | Gradle |
Affects Version/s: | 0.9-rc-3 |
Fix Version/s: | None |
Type: | Bug | ||
Reporter: | Chris Hane | Assignee: | Unassigned |
Resolution: | Won't Fix | Votes: | 3 |
Description |
I am using gradle to build my apps in hudson. In looking at the console ouput for my builds I see the following error message. I'm running hudson in tomcat 7.x. When I asked on the hudson list, they seem to think it is a gradle issue. I'll post the issue # there so they can comment here on what they think needs to be changed. The thread on the hudson list is: Thanks, Could not load Logmanager "org.apache.juli.ClassLoaderLogManager" |
Comments |
Comment by Chris Hane [ 02/Dec/10 ] |
Kohsuke Kawaguchi wrote on the hudson list: Looks like a bug in Gradle to me. I bet it's not passing the proper If you can report the issue to Gradle and let us know where you filed |
Comment by Kohsuke Kawaguchi [ 02/Dec/10 ] |
While I haven't looked into JavaUtilLoggingConfigurer, given that j.u.l.LogManager consults the context classloader to load org.apache.juli.ClassLoaderLogManager, it is the responsibility of JavaUtilLoggingConfigurer to ensure that j.u.l.LogManager can find o.a.j.ClassLoaderLogManager — that involves pushing the current thread context classloader aside, setting it to the right one while you let j.u.l load it, then poping it back. In Hudson (and in many other multi-classloader environment such as Ant, Maven, IDEs), thread context classloader doesn't have anything to do with the classloader that loaded the class that's currently executing. I believe that is causing the problem. |
Comment by Adam Murdoch [ 02/Dec/10 ] |
It looks like j.u.l.LogManager is attempting to load a manager class specified by the java.util.logging.manager system property. Gradle does not set this property. One possibility is that this is being specified when Hudson launches Gradle - either explicitly via a -D command-line option, or accidentally by inheriting the Hudson process' JAVA_OPTS or GRADLE_OPTS environment variables. Any chance you can get a debug log showing the command-line and environment variables that Hudson is using to launch Gradle? |
Comment by Chris Hane [ 03/Dec/10 ] |
Here is the first part of the hudson console. If you need the rest, let me know and I can paste it. Also, I am using the gradle plugin for hudson (http://wiki.hudson-ci.org/display/HUDSON/Green+Balls). FYI in case changes are needed there. Started by user anonymous Updating http://svn.itsolut.com/svn/its/branches/next_gen/app-overlord At revision 5347 no change for http://svn.itsolut.com/svn/its/branches/next_gen/app-overlord since the previous build [app-overlord] $ cmd.exe /C gradle.bat -d -s clean uploadArchives && exit %%ERRORLEVEL%% |
Comment by Adam Murdoch [ 05/Dec/10 ] |
Is it possible for Hudson to show the environment variables it will use to launch Gradle? Also, which version of the Gradle Hudson plugin are you using? It looks like 1.4 might have some fixes in it to stop Hudson's $JAVA_OPTS being inherited by the Gradle process. |
Comment by Chris Hane [ 06/Dec/10 ] |
Started by user anonymous C:\Users\Chris Hane\.hudson\jobs\app-sso\workspace\app-sso>set |
Comment by Adam Murdoch [ 10/Dec/10 ] |
From this output, it looks like Hudson is launching Gradle with $JAVA_OPTS set, and asking Gradle to use org.apache.juli.ClassLoaderLogManager for logging. Which it cannot do. Have you tried using version 1.4 of the Gradle Hudson plugin? I think there are fixes in that version to launch Gradle without $JAVA_OPTS. |
Comment by Chris Hane [ 10/Dec/10 ] |
Version 1.4 of the gradle plugin is the one I am using and hudson is at 1.387. |
Comment by Chris Hane [ 10/Dec/10 ] |
I see in the hudson gradle plugin where the JAVA_OPTS should be deleted. Wonder why it is not. Anyway, I modified the gradle.bat file to unset JAVA_OPTS (set JAVA_OPTS=) and that takes care of this issue - at least as a workaround. |
Comment by Jeff Storey [ 19/Feb/13 ] |
Do we know if this is a gradle or a jenkins issue? I'm seeing it in gradle 1.3 in Jenkins with Tomcat 7. |
Comment by Jesse Glick [ 22/Feb/13 ] |
Jenkins ticket: https://issues.jenkins-ci.org/browse/JENKINS-7702 |
Comment by Jesse Glick [ 19/Dec/13 ] |
Seems like a Tomcat misconfiguration. Use 6.0.37+ or 7.0.38+, or just use setenv.sh to begin with. https://issues.apache.org/bugzilla/show_bug.cgi?id=54601 |
Comment by Benjamin Muschko [ 15/Nov/16 ] |
As announced on the Gradle blog we are planning to completely migrate issues from JIRA to GitHub. We intend to prioritize issues that are actionable and impactful while working more closely with the community. Many of our JIRA issues are inactionable or irrelevant. We would like to request your help to ensure we can appropriately prioritize JIRA issues you’ve contributed to. Please confirm that you still advocate for your JIRA issue before December 10th, 2016 by:
We look forward to collaborating with you more closely on GitHub. Thank you for your contribution to Gradle! |
Comment by Jesse Glick [ 17/Nov/16 ] |
I do not think this was ever a bug in Gradle; it can be closed. |