• 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 

          [JENKINS-63808] Cppcheck is not compatible with Java 11

          Aleksandrs Gumenuks created issue -
          Aleksandrs Gumenuks made changes -
          Labels New: cppcheck plugin
          Aleksandrs Gumenuks made changes -
          Environment Original: lsb_release -a
          No LSB modules are available.
          Distributor ID: Debian
          Description: Debian GNU/Linux 10 (buster)
          Release: 10
          Codename: buster

           sudo update-alternatives --config java
          There are 5 choices for the alternative java (providing /usr/bin/java).

            Selection Path Priority Status
          ------------------------------------------------------------
            0 /usr/lib/jvm/adoptopenjdk-15-hotspot-jre-amd64/bin/java 1151 auto mode
            1 /usr/lib/jvm/adoptopenjdk-11-hotspot-amd64/bin/java 1111 manual mode
            2 /usr/lib/jvm/adoptopenjdk-11-hotspot-jre-amd64/bin/java 1111 manual mode
            3 /usr/lib/jvm/adoptopenjdk-11-openj9-amd64/bin/java 1111 manual mode
            4 /usr/lib/jvm/adoptopenjdk-15-hotspot-jre-amd64/bin/java 1151 manual mode
          * 5 /usr/lib/jvm/adoptopenjdk-8-hotspot-jre-amd64/bin/java 1081 manual mode
          New: org.jenkins-ci.plugins:cppcheck:1.25

          lsb_release -a
          No LSB modules are available.
          Distributor ID: Debian
          Description: Debian GNU/Linux 10 (buster)
          Release: 10
          Codename: buster

           sudo update-alternatives --config java
          There are 5 choices for the alternative java (providing /usr/bin/java).

            Selection Path Priority Status
          ------------------------------------------------------------
            0 /usr/lib/jvm/adoptopenjdk-15-hotspot-jre-amd64/bin/java 1151 auto mode
            1 /usr/lib/jvm/adoptopenjdk-11-hotspot-amd64/bin/java 1111 manual mode
            2 /usr/lib/jvm/adoptopenjdk-11-hotspot-jre-amd64/bin/java 1111 manual mode
            3 /usr/lib/jvm/adoptopenjdk-11-openj9-amd64/bin/java 1111 manual mode
            4 /usr/lib/jvm/adoptopenjdk-15-hotspot-jre-amd64/bin/java 1151 manual mode
          * 5 /usr/lib/jvm/adoptopenjdk-8-hotspot-jre-amd64/bin/java 1081 manual mode
          Oleg Nenashev made changes -
          Labels Original: cppcheck plugin New: cppcheck java11-compatibility plugin
          Oleg Nenashev made changes -
          Epic Link New: JENKINS-55944 [ 197353 ]
          Basil Crow made changes -
          Labels Original: cppcheck java11-compatibility plugin New: cppcheck java11-compatibility jaxb-dependency-missing-classpath plugin

          Rob Bailt added a comment -

          I see there is a pull request available at https://github.com/jenkinsci/cppcheck-plugin/pull/56.  How we go about getting that merged in and ready to deploy?

          Rob Bailt added a comment - I see there is a pull request available at https://github.com/jenkinsci/cppcheck-plugin/pull/56.   How we go about getting that merged in and ready to deploy?

          Bruno Magne added a comment -

          Same question as Rob, when can we expect a release ? Thanks in advance.

          Bruno Magne added a comment - Same question as Rob, when can we expect a release ? Thanks in advance.

          Michael Miner added a comment -

          Is it possible to take the working branch we are waiting to be merged, create a jar and replace the folders in the jenkins plugin folder?

          Michael Miner added a comment - Is it possible to take the working branch we are waiting to be merged, create a jar and replace the folders in the jenkins plugin folder?

          It would really great to get the cppcheck running with Java 11. It is the only plugin left, that blocks the migration of our Jenkins farm to Java 11.

          Aleksandrs Gumenuks added a comment - It would really great to get the cppcheck running with Java 11. It is the only plugin left, that blocks the migration of our Jenkins farm to Java 11.

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

              Created:
              Updated:
              Resolved: