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

Warnings plugin 'Record static analysis results - GNU Make + GNU C Compiler (gcc)’ gives exception with Java 10

    Details

    • Similar Issues:
    • Released As:
      warnings-ng 1.0.0

      Description

      In a multi-configuration freestyle job, that includes Ubuntu 16.04 and Ubuntu 18.04 agents, a gcc build followed by a warnings step 'Record static analysis results - GNU C Compiler (gcc4)’ succeeds.

      However, if the warnings parser is changed to 'GNU Make + GNU C Compiler (gcc)’ then, on the Ubuntu 18.04 machine only, I see an exception:

      Run condition [Or] preventing perform for step [Execute shell]
      [GNU Make + GNU C Compiler (gcc)] Sleeping for 5 seconds due to JENKINS-32191...
      [GNU Make + GNU C Compiler (gcc)] Parsing console log (workspace: '/data/hudsonuser/workspace/Zodiac_gcc_all_versions/label/ubuntu18jenkins')
      ERROR: Step ‘Record static analysis results’ aborted due to exception: 
      Also:   hudson.remoting.Channel$CallSiteStackTrace: Remote call to ubuntu18jenkins
      		at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1741)
      		at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357)
      		at hudson.remoting.Channel.call(Channel.java:955)
      		at hudson.FilePath.act(FilePath.java:1071)
      		at hudson.FilePath.act(FilePath.java:1060)
      		at io.jenkins.plugins.analysis.core.steps.IssuesScanner.postProcess(IssuesScanner.java:145)
      		at io.jenkins.plugins.analysis.core.steps.IssuesScanner.scanInConsoleLog(IssuesScanner.java:121)
      		at io.jenkins.plugins.analysis.core.steps.IssuesScanner.scan(IssuesScanner.java:60)
      		at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.scanWithTool(IssuesRecorder.java:505)
      		at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.record(IssuesRecorder.java:486)
      		at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.perform(IssuesRecorder.java:460)
      		at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:81)
      		at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
      		at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
      		at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
      		at hudson.model.Build$BuildExecution.post2(Build.java:186)
      		at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
      		at hudson.model.Run.execute(Run.java:1840)
      		at hudson.matrix.MatrixRun.run(MatrixRun.java:153)
      		at hudson.model.ResourceController.execute(ResourceController.java:97)
      		at hudson.model.Executor.run(Executor.java:429)
      java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter
      	at edu.hm.hafner.analysis.FullTextFingerprint.createFingerprint(FullTextFingerprint.java:87)
      	at edu.hm.hafner.analysis.FullTextFingerprint.compute(FullTextFingerprint.java:72)
      	at edu.hm.hafner.analysis.FingerprintGenerator.run(FingerprintGenerator.java:37)
      	at io.jenkins.plugins.analysis.core.steps.IssuesScanner$ReportPostProcessor.createFingerprints(IssuesScanner.java:230)
      	at io.jenkins.plugins.analysis.core.steps.IssuesScanner$ReportPostProcessor.invoke(IssuesScanner.java:188)
      	at io.jenkins.plugins.analysis.core.steps.IssuesScanner$ReportPostProcessor.invoke(IssuesScanner.java:167)
      	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:3085)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:212)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:54)
      	at hudson.remoting.Request$2.run(Request.java:369)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:264)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
      	at java.lang.Thread.run(Thread.java:844)
      Caused: java.io.IOException: Remote call on ubuntu18jenkins failed
      	at hudson.remoting.Channel.call(Channel.java:961)
      	at hudson.FilePath.act(FilePath.java:1071)
      	at hudson.FilePath.act(FilePath.java:1060)
      	at io.jenkins.plugins.analysis.core.steps.IssuesScanner.postProcess(IssuesScanner.java:145)
      	at io.jenkins.plugins.analysis.core.steps.IssuesScanner.scanInConsoleLog(IssuesScanner.java:121)
      	at io.jenkins.plugins.analysis.core.steps.IssuesScanner.scan(IssuesScanner.java:60)
      	at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.scanWithTool(IssuesRecorder.java:505)
      	at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.record(IssuesRecorder.java:486)
      	at io.jenkins.plugins.analysis.core.steps.IssuesRecorder.perform(IssuesRecorder.java:460)
      	at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:81)
      	at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:690)
      	at hudson.model.Build$BuildExecution.post2(Build.java:186)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:635)
      	at hudson.model.Run.execute(Run.java:1840)
      	at hudson.matrix.MatrixRun.run(MatrixRun.java:153)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:429)
      Finished: FAILURE 

      This Stackoverflow question may be relevant.

      Ubuntu 16.04 (works) has:

      $ java -version
      openjdk version "1.8.0_181"
      

      Ubuntu 18.04 (fails) has:

      $ java -version
      openjdk version "10.0.2" 2018-07-17
      

        Attachments

          Issue Links

            Activity

            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            We do not support Java 10+ in Jenkins, such support is available only as a preview mode.

            "java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter" says that you need to enable the "java.xml.bind" module on your instance. https://jenkins.io/blog/2018/06/17/running-jenkins-with-java10-11/#java-10 . It may be needed on an agent as well in some cases

             

            Show
            oleg_nenashev Oleg Nenashev added a comment - We do not support Java 10+ in Jenkins, such support is available only as a preview mode. "java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter" says that you need to enable the "java.xml.bind" module on your instance. https://jenkins.io/blog/2018/06/17/running-jenkins-with-java10-11/#java-10 . It may be needed on an agent as well in some cases  
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            Ulli Hafner you may want to remove dependency on javax.xml.bind from Warnings plugin 5.0.0. If it is possible, it would be a good step to keep the code clean. On our side there is JENKINS-51965 to make JAXB available by default on masters, but I am not 100% sure it will work fine with agents via remote classloading.

             

            Show
            oleg_nenashev Oleg Nenashev added a comment - Ulli Hafner you may want to remove dependency on javax.xml.bind from Warnings plugin 5.0.0. If it is possible, it would be a good step to keep the code clean. On our side there is  JENKINS-51965 to make JAXB available by default on masters, but I am not 100% sure it will work fine with agents via remote classloading.  
            Hide
            drulli Ulli Hafner added a comment -
            Show
            drulli Ulli Hafner added a comment - See #a04f3e8ed57 .
            Hide
            drulli Ulli Hafner added a comment -

            Oleg Nenashev Do we have a list of forbidden references? Then I can update my architecture test accordingly.

            Show
            drulli Ulli Hafner added a comment - Oleg Nenashev Do we have a list of forbidden references? Then I can update my architecture test accordingly.
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            Building with JDK 11 is probably the most straigthforward way. Example: https://github.com/jenkinsci/label-verifier-plugin/pull/4

            The build flow for Java 11 is not in GA yet, but you can build plugins with the latest weekly release.

            Show
            oleg_nenashev Oleg Nenashev added a comment - Building with JDK 11 is probably the most straigthforward way. Example: https://github.com/jenkinsci/label-verifier-plugin/pull/4 The build flow for Java 11 is not in GA yet, but you can build plugins with the latest weekly release.

              People

              • Assignee:
                drulli Ulli Hafner
                Reporter:
                davida2009 David Aldrich
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: