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

Cppcheck is not compatible with Java 11

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • cppcheck-plugin
    • 1.26

      Failure happens with whatever JDK/JRE11. Works however with JRE8.

      Seems to be similar to
      https://issues.jenkins-ci.org/browse/JENKINS-55202?jql=project%20%3D%20JENKINS%20AND%20component%20%3D%20performance-signature-dynatrace-plugin

      Workaround described here did not help:
      https://wiki.jenkins.io/display/JENKINS/JAXB+usage+in+Jenkins+plugins

      323/323 files checked 100% done
      [Cppcheck] Starting the cppcheck analysis.
      [Cppcheck] Processing 1 files with the pattern '**/cppcheck-result.xml'.
      [Cppcheck] Parsing throws exceptions. javax.xml.bind.JAXBException: Implementation of JAXB-API has not been found on module path or classpath.
       - with linked exception:
      [java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory]
      [Cppcheck] java.io.IOException: javax.xml.bind.JAXBException: Implementation of JAXB-API has not been found on module path or classpath.
       - with linked exception:
      [java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory]
      	at org.jenkinsci.plugins.cppcheck.parser.CppcheckParser.parse(CppcheckParser.java:67)
      	at org.jenkinsci.plugins.cppcheck.CppcheckParserResult.invoke(CppcheckParserResult.java:69)
      	at org.jenkinsci.plugins.cppcheck.CppcheckParserResult.invoke(CppcheckParserResult.java:24)
      	at hudson.FilePath.act(FilePath.java:1076)
      	at hudson.FilePath.act(FilePath.java:1059)
      	at org.jenkinsci.plugins.cppcheck.CppcheckPublisher.perform(CppcheckPublisher.java:406)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
      	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:1919)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:97)
      	at hudson.model.Executor.run(Executor.java:428)
      Caused by: javax.xml.bind.JAXBException: Implementation of JAXB-API has not been found on module path or classpath.
       - with linked exception:
      [java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory]
      	at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:278)
      	at javax.xml.bind.ContextFinder.find(ContextFinder.java:421)
      	at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:721)
      	at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:662)
      	at org.jenkinsci.plugins.cppcheck.parser.CppcheckParser.parse(CppcheckParser.java:53)
      	... 14 more
      Caused by: java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory
      	at jenkins.telemetry.impl.java11.CatcherClassLoader.findClass(CatcherClassLoader.java:47)
      	at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
      	at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
      	at javax.xml.bind.ServiceLoaderUtil.nullSafeLoadClass(ServiceLoaderUtil.java:122)
      	at javax.xml.bind.ServiceLoaderUtil.safeLoadClass(ServiceLoaderUtil.java:155)
      	at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:276)
      	... 18 moreBuild step 'Publish Cppcheck results' changed build result to FAILURE
      Build step 'Publish Cppcheck results' marked build as failure
      [Checks API] No suitable checks publisher found.
      Finished: FAILURE 

            basil Basil Crow
            reanimator Aleksandrs Gumenuks
            Votes:
            8 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: