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

MSTest plugin (v. 0.18) returns "java.lang.NoClassDefFoundError"

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Component/s: mstest-plugin
    • Labels:
      None
    • Environment:
      Windows 2008 R2 - Jenkins ver. 1.596.2 - Java version "1.6.0_26"
    • Similar Issues:

      Description

      An error is thrown while trying to import the .TRX file. It looks like the import should be "java/nio/charset/StandardCharset" rather then "java/nio/charset/StandardCharsets"?

      ERROR: Publisher hudson.plugins.mstest.MSTestPublisher aborted due to exception
      java.lang.NoClassDefFoundError: java/nio/charset/StandardCharsets
      at hudson.plugins.mstest.ContentCorrector.fix(ContentCorrector.java:27)
      at hudson.plugins.mstest.MSTestTransformer.invoke(MSTestTransformer.java:73)
      at hudson.plugins.mstest.MSTestTransformer.invoke(MSTestTransformer.java:23)
      at hudson.FilePath.act(FilePath.java:989)
      at hudson.FilePath.act(FilePath.java:967)
      at hudson.plugins.mstest.MSTestPublisher.perform(MSTestPublisher.java:120)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:761)
      at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:721)
      at hudson.model.Build$BuildExecution.post2(Build.java:183)
      at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:670)
      at hudson.model.Run.execute(Run.java:1766)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:98)
      at hudson.model.Executor.run(Executor.java:374)
      Caused by: java.lang.ClassNotFoundException: java.nio.charset.StandardCharsets
      at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1375)
      at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1325)
      at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1078)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      ... 15 more

        Attachments

          Activity

          czerny Libero Scarcelli created issue -
          Hide
          nilleb Ivo Bellin Salarin added a comment -

          https://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.html

          StandardCharsets is a valid class. Since Java.. 1.7. I regret to say that mstest-plugin 0.18 supports only Java 1.7.

          I will try to replace the faulting code with something better. Are you willing to test the patch, when it will be available?

          Thanks for your bug report,
          Ivo

          Show
          nilleb Ivo Bellin Salarin added a comment - https://docs.oracle.com/javase/7/docs/api/java/nio/charset/StandardCharsets.html StandardCharsets is a valid class. Since Java.. 1.7. I regret to say that mstest-plugin 0.18 supports only Java 1.7. I will try to replace the faulting code with something better. Are you willing to test the patch, when it will be available? Thanks for your bug report, Ivo
          Hide
          czerny Libero Scarcelli added a comment -

          HI,

          thank you for your prompt reply. Yes, I am willing to test the change. I can just update the JRE. I am not running "1.612" but an older one (more recent than 1.579 though) so Jenkins is still running on the recommended JVM for that version (1.6)

          Thank you very much

          Show
          czerny Libero Scarcelli added a comment - HI, thank you for your prompt reply. Yes, I am willing to test the change. I can just update the JRE. I am not running "1.612" but an older one (more recent than 1.579 though) so Jenkins is still running on the recommended JVM for that version (1.6) Thank you very much
          czerny Libero Scarcelli made changes -
          Field Original Value New Value
          Environment Windows 2008 R2 - Jenkins ver. 1.609.1 - Java version "1.6.0_26" Windows 2008 R2 - Jenkins ver. 1.596.2 - Java version "1.6.0_26"
          Hide
          sudarsanyes sudarsan srinivasan added a comment -

          Ivo Bellin Salarin, even I am facing the same issue!

          Show
          sudarsanyes sudarsan srinivasan added a comment - Ivo Bellin Salarin , even I am facing the same issue!
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: nilleb
          Path:
          src/main/java/hudson/plugins/mstest/ContentCorrector.java
          src/test/java/hudson/plugins/mstest/MSTestReportConverterTest.java
          src/test/java/hudson/plugins/mstest/MSTestTransformerAndConverterTest.java
          http://jenkins-ci.org/commit/mstest-plugin/54085aa8db1beddcdc4342fee671c09c080771bd
          Log:
          JENKINS-29032 java 1.6 compatibility

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: nilleb Path: src/main/java/hudson/plugins/mstest/ContentCorrector.java src/test/java/hudson/plugins/mstest/MSTestReportConverterTest.java src/test/java/hudson/plugins/mstest/MSTestTransformerAndConverterTest.java http://jenkins-ci.org/commit/mstest-plugin/54085aa8db1beddcdc4342fee671c09c080771bd Log: JENKINS-29032 java 1.6 compatibility
          Hide
          nilleb Ivo Bellin Salarin added a comment -

          available in 0.19 (published 2015/09/01)

          Show
          nilleb Ivo Bellin Salarin added a comment - available in 0.19 (published 2015/09/01)
          nilleb Ivo Bellin Salarin made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 163898 ] JNJira + In-Review [ 197346 ]

            People

            • Assignee:
              nilleb Ivo Bellin Salarin
              Reporter:
              czerny Libero Scarcelli
            • Votes:
              1 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: