Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-44700

Publishing junit report fails with 'Could not initialize class jenkins.model.Jenkins'

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • junit-plugin
    • None
    • jenkins 2.46.3

    Description

      Junit failing randomly on some build slave nodes with:
      00:02:29.418 Recording test results*00:02:29.421* ERROR: Step ‘Publish JUnit test result report’ aborted due to exception: 00:02:29.421 java.lang.NoClassDefFoundError: Could not initialize class jenkins.model.Jenkins

      Attachments

        Issue Links

          Activity

            emanuelez emanuelez added a comment -

            Seeing the same issue here. It only happens on macOS slaves that run inside a VMWare Fusion VM. It does not happen all the time, but with a 20% probability. I took a look at the TCP traffic and no TCP errors or lost packets were found.

            Given the stacktrace I think this actually belongs in the JUnit component.

             
            Suppressed: java.io.IOException: remote file operation failed: <somepath> at hudson.remoting.Channel@1bf668af:JNLP4-connect connection from <ip address>: java.io.IOException: Remote call on JNLP4-connect connection from <ip address>
            failed
            ... 15 more
            Caused by: java.io.IOException: Remote call on JNLP4-connect connection from <ip address>
            failed
            at hudson.remoting.Channel.call(Channel.java:838)
            at hudson.FilePath.act(FilePath.java:985)
            ... 14 more
            Caused by: java.lang.NoClassDefFoundError: Could not initialize class jenkins.model.Jenkins at hudson.util.io.ParserConfigurator.applyConfiguration(ParserConfigurator.java:78)
            at hudson.tasks.junit.SuiteResult.parse(SuiteResult.java:124)
            at hudson.tasks.junit.TestResult.parse(TestResult.java:302)
            at hudson.tasks.junit.TestResult.parsePossiblyEmpty(TestResult.java:244)
            at hudson.tasks.junit.TestResult.parse(TestResult.java:175)
            at hudson.tasks.junit.TestResult.parse(TestResult.java:154)
            at hudson.tasks.junit.TestResult.<init>(TestResult.java:126)
            at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:132)
            at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:107)
            at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2731)
            at hudson.remoting.UserRequest.perform(UserRequest.java:153)
            at hudson.remoting.UserRequest.perform(UserRequest.java:50)
            at hudson.remoting.Request$2.run(Request.java:336)
            at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
            at java.util.concurrent.FutureTask.run(FutureTask.java:266)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
            at hudson.remoting.Engine$1$1.run(Engine.java:94)
            at java.lang.Thread.run(Thread.java:748)
            at ......remote call to JNLP4-connect connection from <ip address>
            (Native Method)
            at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1545)
            at hudson.remoting.UserResponse.retrieve(UserRequest.java:253)
            at hudson.remoting.Channel.call(Channel.java:830)
            ... 15 more
            Caused by: java.io.IOException: Remote call on JNLP4-connect connection from <ip address>
            failed
            at hudson.remoting.Channel.call(Channel.java:838)
            at hudson.FilePath.act(FilePath.java:985)
            ... 14 more
            Caused by: java.lang.NoClassDefFoundError: Could not initialize class jenkins.model.Jenkins at hudson.util.io.ParserConfigurator.applyConfiguration(ParserConfigurator.java:78)
            at hudson.tasks.junit.SuiteResult.parse(SuiteResult.java:124)
            at hudson.tasks.junit.TestResult.parse(TestResult.java:302)
            at hudson.tasks.junit.TestResult.parsePossiblyEmpty(TestResult.java:244)
            at hudson.tasks.junit.TestResult.parse(TestResult.java:175)
            at hudson.tasks.junit.TestResult.parse(TestResult.java:154)
            at hudson.tasks.junit.TestResult.<init>(TestResult.java:126)
            at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:132)
            at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:107)
            at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2731)
            at hudson.remoting.UserRequest.perform(UserRequest.java:153)
            at hudson.remoting.UserRequest.perform(UserRequest.java:50)
            at hudson.remoting.Request$2.run(Request.java:336)
            at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
            at java.util.concurrent.FutureTask.run(FutureTask.java:266)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
            at hudson.remoting.Engine$1$1.run(Engine.java:94)
            at java.lang.Thread.run(Thread.java:748)
            at ......remote call to JNLP4-connect connection from <ip address>
            (Native Method)
            at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1545)
            at hudson.remoting.UserResponse.retrieve(UserRequest.java:253)
            at hudson.remoting.Channel.call(Channel.java:830)
            ... 15 more

            emanuelez emanuelez added a comment - Seeing the same issue here. It only happens on macOS slaves that run inside a VMWare Fusion VM. It does not happen all the time, but with a 20% probability. I took a look at the TCP traffic and no TCP errors or lost packets were found. Given the stacktrace I think this actually belongs in the JUnit component.   Suppressed: java.io.IOException: remote file operation failed: <somepath> at hudson.remoting.Channel@1bf668af:JNLP4-connect connection from <ip address>: java.io.IOException: Remote call on JNLP4-connect connection from <ip address> failed ... 15 more Caused by: java.io.IOException: Remote call on JNLP4-connect connection from <ip address> failed at hudson.remoting.Channel.call(Channel.java:838) at hudson.FilePath.act(FilePath.java:985) ... 14 more Caused by: java.lang.NoClassDefFoundError: Could not initialize class jenkins.model.Jenkins at hudson.util.io.ParserConfigurator.applyConfiguration(ParserConfigurator.java:78) at hudson.tasks.junit.SuiteResult.parse(SuiteResult.java:124) at hudson.tasks.junit.TestResult.parse(TestResult.java:302) at hudson.tasks.junit.TestResult.parsePossiblyEmpty(TestResult.java:244) at hudson.tasks.junit.TestResult.parse(TestResult.java:175) at hudson.tasks.junit.TestResult.parse(TestResult.java:154) at hudson.tasks.junit.TestResult.<init>(TestResult.java:126) at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:132) at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:107) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2731) at hudson.remoting.UserRequest.perform(UserRequest.java:153) at hudson.remoting.UserRequest.perform(UserRequest.java:50) at hudson.remoting.Request$2.run(Request.java:336) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at hudson.remoting.Engine$1$1.run(Engine.java:94) at java.lang.Thread.run(Thread.java:748) at ......remote call to JNLP4-connect connection from <ip address> (Native Method) at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1545) at hudson.remoting.UserResponse.retrieve(UserRequest.java:253) at hudson.remoting.Channel.call(Channel.java:830) ... 15 more Caused by: java.io.IOException: Remote call on JNLP4-connect connection from <ip address> failed at hudson.remoting.Channel.call(Channel.java:838) at hudson.FilePath.act(FilePath.java:985) ... 14 more Caused by: java.lang.NoClassDefFoundError: Could not initialize class jenkins.model.Jenkins at hudson.util.io.ParserConfigurator.applyConfiguration(ParserConfigurator.java:78) at hudson.tasks.junit.SuiteResult.parse(SuiteResult.java:124) at hudson.tasks.junit.TestResult.parse(TestResult.java:302) at hudson.tasks.junit.TestResult.parsePossiblyEmpty(TestResult.java:244) at hudson.tasks.junit.TestResult.parse(TestResult.java:175) at hudson.tasks.junit.TestResult.parse(TestResult.java:154) at hudson.tasks.junit.TestResult.<init>(TestResult.java:126) at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:132) at hudson.tasks.junit.JUnitParser$ParseResultCallable.invoke(JUnitParser.java:107) at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2731) at hudson.remoting.UserRequest.perform(UserRequest.java:153) at hudson.remoting.UserRequest.perform(UserRequest.java:50) at hudson.remoting.Request$2.run(Request.java:336) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at hudson.remoting.Engine$1$1.run(Engine.java:94) at java.lang.Thread.run(Thread.java:748) at ......remote call to JNLP4-connect connection from <ip address> (Native Method) at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1545) at hudson.remoting.UserResponse.retrieve(UserRequest.java:253) at hudson.remoting.Channel.call(Channel.java:830) ... 15 more
            danielbeck Daniel Beck added a comment -

            Would be helpful if both of you could provide the versions of Jenkins and the JUnit plugin you're using.

            danielbeck Daniel Beck added a comment - Would be helpful if both of you could provide the versions of Jenkins and the JUnit plugin you're using.
            emanuelez emanuelez added a comment -

            This happens with LTS 2.46.3 and junit 1.20

            emanuelez emanuelez added a comment - This happens with LTS 2.46.3 and junit 1.20
            pooja pooja shah added a comment - - edited

            emanuelez

            when this error occurs again. try disconnecting slave & re connect (jenkins->manage->node), if that fixes then it must be problem with the jobs you are running which are exhausting disk/memory and you need to find out fix for that.

            explanation:  when disk/memory runs out & slave is constantly trying to be in connection, few of the classes are loaded in jenkins server and few doesn't that is why you see, jenkins is up, and your job as well is running but the reporter failed to report because it needs that class.

            how I can confirm this: I was going through same problem 10 days back and reading jenkins node's log gave me clues (there was an interruption exception and then node came back but not properly)

             

            and if this is true for you then it is not junit plugin's issue, can be closed.

             

            pooja pooja shah added a comment - - edited emanuelez when this error occurs again. try disconnecting slave & re connect (jenkins->manage->node), if that fixes then it must be problem with the jobs you are running which are exhausting disk/memory and you need to find out fix for that. explanation:  when disk/memory runs out & slave is constantly trying to be in connection, few of the classes are loaded in jenkins server and few doesn't that is why you see, jenkins is up, and your job as well is running but the reporter failed to report because it needs that class. how I can confirm this: I was going through same problem 10 days back and reading jenkins node's log gave me clues (there was an interruption exception and then node came back but not properly)   and if this is true for you then it is not junit plugin's issue, can be closed.  

            People

              Unassigned Unassigned
              piratejohnny Jon B
              Votes:
              3 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated: