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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Blocker
    • Resolution: Fixed
    • mstest-plugin
    • None
    • Windows 2008 R2 - Jenkins ver. 1.596.2 - Java version "1.6.0_26"

    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

          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

          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

          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 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

          nilleb, even I am facing the same issue!

          sudarsanyes sudarsan srinivasan added a comment - nilleb , even I am facing the same issue!

          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

          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

          available in 0.19 (published 2015/09/01)

          nilleb Ivo Bellin Salarin added a comment - available in 0.19 (published 2015/09/01)

          People

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

            Dates

              Created:
              Updated:
              Resolved: