[JIRA] [monitoring-plugin] (JENKINS-31619) java.lang.NoClassDefFoundError: Could not initialize class net.bull.javamelody.I18N

148 views
Skip to first unread message

tsniatowski@opera.com (JIRA)

unread,
Nov 18, 2015, 2:04:03 AM11/18/15
to jenkinsc...@googlegroups.com
Tomasz Śniatowski created an issue
 
Jenkins / Bug JENKINS-31619
java.lang.NoClassDefFoundError: Could not initialize class net.bull.javamelody.I18N
Issue Type: Bug Bug
Assignee: Unassigned
Components: monitoring-plugin
Created: 18/Nov/15 7:03 AM
Environment: Jenkins ver. 1.625.1
Monitoring 1.57.0
Priority: Minor Minor
Reporter: Tomasz Śniatowski
Nov 16, 2015 6:54:59 AM net.bull.javamelody.JavaLogger warn
WARNING: exception while collecting data
java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: Could not initialize class net.bull.javamelody.I18N
        at hudson.remoting.Channel$2.adapt(Channel.java:810)
        at hudson.remoting.Channel$2.adapt(Channel.java:805)
        at hudson.remoting.FutureAdapter.get(FutureAdapter.java:59)
        at net.bull.javamelody.RemoteCallHelper.collectDataByNodeName(RemoteCallHelper.java:169)
        at net.bull.javamelody.RemoteCallHelper.collectJavaInformationsListByName(RemoteCallHelper.java:179)
        at net.bull.javamelody.NodesCollector.collectWithoutErrorsNow(NodesCollector.java:154)
        at net.bull.javamelody.NodesCollector.collectWithoutErrors(NodesCollector.java:143)
        at net.bull.javamelody.NodesCollector$1.run(NodesCollector.java:87)
        at java.util.TimerThread.mainLoop(Timer.java:555)
        at java.util.TimerThread.run(Timer.java:505)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class net.bull.javamelody.I18N
        at net.bull.javamelody.RemoteCallHelper$DelegatingTask.call(RemoteCallHelper.java:130)
        at hudson.remoting.UserRequest.perform(UserRequest.java:121)
        at hudson.remoting.UserRequest.perform(UserRequest.java:49)
        at hudson.remoting.Request$2.run(Request.java:326)
        at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
        at ......remote call to master_git(Native Method)
        at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1413)
        at hudson.remoting.UserResponse.retrieve(UserRequest.java:221)
        at hudson.remoting.Channel$2.adapt(Channel.java:808)
        ... 9 more

seems to have started happening after an upgrade from an old version of both jenkins and the plugin

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

evernat@free.fr (JIRA)

unread,
Nov 28, 2015, 1:00:01 PM11/28/15
to jenkinsc...@googlegroups.com
evernat resolved as Cannot Reproduce
 

I do not have this issue. I suggest to restart the server and see if reproduced.

Change By: evernat
Status: Open Resolved
Resolution: Cannot Reproduce

tsniatowski@opera.com (JIRA)

unread,
Dec 2, 2015, 3:34:04 AM12/2/15
to jenkinsc...@googlegroups.com
Tomasz Śniatowski commented on Bug JENKINS-31619
 
Re: java.lang.NoClassDefFoundError: Could not initialize class net.bull.javamelody.I18N

The issue persisted across reboots and plugin reinstalls. However during the reinstall I noticed it seems to be related to JENKINS_HOME/cache/jars. I have a non-default JENKINS_HOME and $HOME/.jenkins exists with 000 permissions. The install process tried to write jars to $HOME/.jenkins/cache/jars for some reason. After I allowed it, it created a bunch of jar files there and the missing class errors disappeared from the logs.

I was unable to reproduce the issue on my test instance that runs a newer version (1.631)

joshiadi@gmail.com (JIRA)

unread,
Feb 22, 2016, 12:25:02 PM2/22/16
to jenkinsc...@googlegroups.com

I'm able to reproduce the issue in Jenkins 1.632. We have installed Jenkins in a custom location and use JENKINS_HOME. However, I couldn't find any directory called $JENKINS_HOME/.jenkins or $HOME/.jenkins (for the user running Jenkins instance). The error happens at runtime and we see it almost every hour in the Jenkins log files.

Is there any env variable we can use before installing the Monitoring plugin (https://wiki.jenkins-ci.org/display/JENKINS/Monitoring), so to avoid seeing this error? Thanks.

tsniatowski@opera.com (JIRA)

unread,
Feb 25, 2016, 3:18:01 AM2/25/16
to jenkinsc...@googlegroups.com

Aditya Joshi: Can you try creating empty writable directories so that $HOME/.jenkins/cache/jars exists during plugin installation? If that helps, I believe this bug shoud be reopened and renamed to "installing the monitoring plugin does not respect custom JENKINS_HOME when it comes to jar cache".

joshiadi@gmail.com (JIRA)

unread,
Mar 22, 2016, 12:56:06 PM3/22/16
to jenkinsc...@googlegroups.com

Thanks Tomasz, I don't see the above mentioned error anymore after creating the empty writable directory $HOME/.jenkins/cache/jars and reinstalling the monitoring plugin. I do get the error mentioned in https://issues.jenkins-ci.org/browse/JENKINS-29257 but that seems to be a separate issue.

joshiadi@gmail.com (JIRA)

unread,
Mar 22, 2016, 12:58:01 PM3/22/16
to jenkinsc...@googlegroups.com
Aditya Joshi updated an issue
 
Change By: Aditya Joshi
Comment:
Thanks Tomasz, I don't see the above mentioned error anymore after creating the empty writable directory  $HOME/.jenkins/cache/jars and reinstalling the monitoring plugin. I do get the error mentioned in https://issues.jenkins-ci.org/browse/JENKINS-29257 but that seems to be a separate issue.

schristou88@gmail.com (JIRA)

unread,
Mar 22, 2016, 1:32:02 PM3/22/16
to jenkinsc...@googlegroups.com
Steven Christou commented on Bug JENKINS-31619
 
Re: java.lang.NoClassDefFoundError: Could not initialize class net.bull.javamelody.I18N

Tomasz Śniatowski I am wondering if this is caused by the monitoring plugin, and the monitoring jar having the same package path which might confuse the classloader. Potentially fixed by forcing the binaries location: https://github.com/christ66/monitoring-plugin/commit/df81844f763ee416ffe445ad8552d158e62f0db3.

tsniatowski@opera.com (JIRA)

unread,
Mar 23, 2016, 3:41:03 AM3/23/16
to jenkinsc...@googlegroups.com
Tomasz Śniatowski reopened an issue
 
Change By: Tomasz Śniatowski
Resolution: Cannot Reproduce
Status: Resolved Reopened

tsniatowski@opera.com (JIRA)

unread,
Mar 23, 2016, 3:41:03 AM3/23/16
to jenkinsc...@googlegroups.com
Tomasz Śniatowski commented on Bug JENKINS-31619
 
Re: java.lang.NoClassDefFoundError: Could not initialize class net.bull.javamelody.I18N

There are errors installing if the aforementioned directory is not writable so I doubt this change is effective.

To reiterate: the problem appears when a non-default JENKINS_HOME is used, and the default $HOME/.jenkins/cache/jars does not exist / is not writable.

Reply all
Reply to author
Forward
0 new messages