• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • sloccount-plugin
    • None
    • Master: Jenkins ver. 2.222.1, sloccount v1.24, Java 11.0.7+10-LTS
      Agent: WIndows 10

      Problem

      SLOCCount Results tables in dashboard views show 0 files, 0 lines, etc. even though summary table on main page of job shows cloc results. See attached screenshots.

      Execution

      1. Jenkins pipeline calls bat step to run cloc.pl v 1.82 (http://github.com/AlDanial/cloc) against mixed codebase on Windows 10 VM agent, on ActiveState Perl v5.22
      2. Output from cloc.pl is saved as XML files.
      3. Jenkins pipeline call sloccountPublish step on XML files
      4. Jenkins console displays SLOCCount results on main page of job (see screen captures)

          [JENKINS-62940] No sloccount results in dahsboard tables

          Doug Whitfield added a comment - - edited

          hmm, I am seeing something similar, but I don't think anything is displaying on either page.

          I see this error in the jenkins.log:

          Added a missed class for missing class telemetry. Class: com.sun.xml.internal.bind.v2.ContextFactory

          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(ClassLoader.java:588)}}
          {{ at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)}}
          {{ 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)}}
          {{ 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 hudson.plugins.sloccount.model.cloc.ClocReport.parse(ClocReport.java:65)}

          }

          Doug Whitfield added a comment - - edited hmm, I am seeing something similar, but I don't think anything is displaying on either page. I see this error in the jenkins.log: Added a missed class for missing class telemetry. Class: com.sun.xml.internal.bind.v2.ContextFactory 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(ClassLoader.java:588)}} {{ at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)}} {{ 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)}} {{ 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 hudson.plugins.sloccount.model.cloc.ClocReport.parse(ClocReport.java:65)} }

          Eugene Pechenezhsky added a comment - - edited

          This only happens if you use cloc.xml, sloccount.sc will work just fine. It's due to a Java >8 compatibility issue which affects many plugins doing XML parsing (see here: https://www.jesperdj.com/2018/09/30/jaxb-on-java-9-10-11-and-beyond/). I downgraded to a JDK8 installation in jenkins.xml/<executable> and all is well.

          If you don't have this option, you will need to do the XSLT transform as described on the plugin page (see "Script for XSLT transformation" section at https://plugins.jenkins.io/sloccount/), but keep in mind that it's missing some features like comment line counts.

          Eugene Pechenezhsky added a comment - - edited This only happens if you use cloc.xml, sloccount.sc will work just fine. It's due to a Java >8 compatibility issue which affects many plugins doing XML parsing (see here: https://www.jesperdj.com/2018/09/30/jaxb-on-java-9-10-11-and-beyond/ ). I downgraded to a JDK8 installation in jenkins.xml/<executable> and all is well. If you don't have this option, you will need to do the XSLT transform as described on the plugin page (see "Script for XSLT transformation" section at https://plugins.jenkins.io/sloccount/ ), but keep in mind that it's missing some features like comment line counts.

          I can confirm java.home in my Jenkins System Information is /usr/lib/jvm/java-11-openjdk-11.0.8.10-0.el7_8.x86_64

          Philip Steiner added a comment - I can confirm java.home in my Jenkins System Information is /usr/lib/jvm/java-11-openjdk-11.0.8.10-0.el7_8.x86_64

          Gergan Zhekov added a comment -

          We had the same issue, but when testing with version 1.25 of the plugin manually (not officially released) everything seems to be working ok.

          Gergan Zhekov added a comment - We had the same issue, but when testing with version 1.25 of the plugin manually (not officially released) everything seems to be working ok.

          Gergan Zhekov added a comment -

          New version of the plugin is released - it fixed the issue on our side. Can somebody else also confirm, so we can close this ticket?

          Gergan Zhekov added a comment - New version of the plugin is released - it fixed the issue on our side. Can somebody else also confirm, so we can close this ticket?

          Michael Rush added a comment - - edited

          Thanks Gergan!! Confirmed, this is now working again for me. (Jenkins 2.321 / Corretto-11.0.13.8.1)

          Michael Rush added a comment - - edited Thanks Gergan!! Confirmed, this is now working again for me. (Jenkins 2.321 / Corretto-11.0.13.8.1)

            npiguet npiguet
            psteiner Philip Steiner
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: