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

TAP plugin fails to load with java.lang.NoClassDefFoundError: hudson/tasks/test/AbstractTestResultAction

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Since I upgraded jenkins to the latest revision, the TAP plugin failed with:

      TAP Reports Processing: START Looking for TAP results report in workspace using pattern: out.tap Saving reports... Processing '/var/lib/jenkins/jobs/testrunner-x86-vm-cross/builds/1/tap-master-files/out.tap' 
      Parsing TAP test result [/var/lib/jenkins/jobs/testrunner-x86-vm-cross/builds/1/tap-master-files/out.tap]. 
      ERROR: Publisher org.tap4j.plugin.TapPublisher aborted due to exception 
      java.lang.NoClassDefFoundError: hudson/tasks/test/AbstractTestResultAction
       at java.lang.ClassLoader.defineClass1(Native Method)
       at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
       at jenkins.util.AntClassLoader.defineClassFromData(AntClassLoader.java:1138)
       at hudson.ClassicPluginStrategy$AntClassLoader2.defineClassFromData(ClassicPluginStrategy.java:799)
       at jenkins.util.AntClassLoader.getClassFromStream(AntClassLoader.java:1309)
       at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1365)
       at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1325)
       at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1078)
       at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
       at org.tap4j.plugin.TapPublisher.perform(TapPublisher.java:263)
       at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:32)
       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:1742)
       at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
       at hudson.model.ResourceController.execute(ResourceController.java:89)
       at hudson.model.Executor.run(Executor.java:240) Caused by: java.lang.ClassNotFoundException: hudson.tasks.test.AbstractTestResultAction
       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(ClassLoader.java:358)
       ... 19 more
       Finished: FAILURE
      

      I know my tap file is correct, I checked it validates with the given web service on the wiki page of the plugin. Also this used to work prior a Jenkins upgrade.

      You can access the full log at http://jenkins.minix3.org/job/testrunner-x86-vm-cross/1/console

        Attachments

          Activity

          sambuc Lionel Sambuc created issue -
          Hide
          sambuc Lionel Sambuc added a comment -

          I updated to version 1.22, and sadly still see the same problem.

          Log with the latest run with the TAP plugin (v1.22) enabled:
          http://jenkins.minix3.org/job/testrunner-x86-vm-cross/4/console

          Show
          sambuc Lionel Sambuc added a comment - I updated to version 1.22, and sadly still see the same problem. Log with the latest run with the TAP plugin (v1.22) enabled: http://jenkins.minix3.org/job/testrunner-x86-vm-cross/4/console
          Hide
          danielbeck Daniel Beck added a comment -

          Enable the JUnit plugin.

          Show
          danielbeck Daniel Beck added a comment - Enable the JUnit plugin.
          danielbeck Daniel Beck made changes -
          Field Original Value New Value
          Resolution Not A Defect [ 7 ]
          Status Open [ 1 ] Resolved [ 5 ]
          Hide
          sambuc Lionel Sambuc added a comment - - edited

          I have been able to check that enabling the JUnit plugin solves the problem.

          I believe the documentation, at least on the main page (https://wiki.jenkins-ci.org/display/JENKINS/TAP+Plugin) should explicitly mention this dependency.

          Last time I checked, it states it has only one dependency (which is actually provided!) but doesn't say it requires the JUnit plugin to be enabled:
          "
          TAP Plug-in has only one dependency, tap4j - a TAP implementation for Java.
          "

          I think it would be enough to correct the statement above, and add a step in the configuration which says to enable both JUnit and TAP plugins.

          Thanks for your answers.

          Regards.

          Show
          sambuc Lionel Sambuc added a comment - - edited I have been able to check that enabling the JUnit plugin solves the problem. I believe the documentation, at least on the main page ( https://wiki.jenkins-ci.org/display/JENKINS/TAP+Plugin ) should explicitly mention this dependency. Last time I checked, it states it has only one dependency (which is actually provided!) but doesn't say it requires the JUnit plugin to be enabled: " TAP Plug-in has only one dependency, tap4j - a TAP implementation for Java. " I think it would be enough to correct the statement above, and add a step in the configuration which says to enable both JUnit and TAP plugins. Thanks for your answers. Regards.
          Hide
          danielbeck Daniel Beck added a comment -

          should explicitly mention this dependency.

          It can't, because it's based on a Jenkins core version from back when JUnit was a core feature, so from the plugin POV, it does not have that dependency – it just requires whatever was in Jenkins core 1.488.

          Show
          danielbeck Daniel Beck added a comment - should explicitly mention this dependency. It can't, because it's based on a Jenkins core version from back when JUnit was a core feature, so from the plugin POV, it does not have that dependency – it just requires whatever was in Jenkins core 1.488.
          Hide
          danielbeck Daniel Beck added a comment -

          FWIW there's a proposal to more clearly tell you what's wrong (https://github.com/jenkinsci/jenkins/pull/1573), but I'm not sure detached plugins are covered.

          Show
          danielbeck Daniel Beck added a comment - FWIW there's a proposal to more clearly tell you what's wrong ( https://github.com/jenkinsci/jenkins/pull/1573 ), but I'm not sure detached plugins are covered.
          kinow Bruno P. Kinoshita made changes -
          Comment [ Thanks Daniel! So I believe that if I update the Jenkins version in the plug-in pom.xml, and add a dependency to junit-plugin, that will fix the issue in the next releases of the tap-plugin? ]
          Hide
          kinow Bruno P. Kinoshita added a comment -

          Thanks Daniel!

          Lionel, 1.23 has been released with Jenkins 1.580.3 dependency. Could you give it a try, please?

          Show
          kinow Bruno P. Kinoshita added a comment - Thanks Daniel! Lionel, 1.23 has been released with Jenkins 1.580.3 dependency. Could you give it a try, please?
          Hide
          kinow Bruno P. Kinoshita added a comment -

          Nah, just reproduced the issue with the latest code.

          Show
          kinow Bruno P. Kinoshita added a comment - Nah, just reproduced the issue with the latest code.
          Hide
          danielbeck Daniel Beck added a comment - - edited

          Jenkins does not currently enforce that all plugins that are dependencies of enabled plugins are also enabled. So you can still mess it up.

          However making the dependency explicit documents it on the wiki, and will help when this enforcement is implemented (JENKINS-23150 and related).

          Show
          danielbeck Daniel Beck added a comment - - edited Jenkins does not currently enforce that all plugins that are dependencies of enabled plugins are also enabled. So you can still mess it up. However making the dependency explicit documents it on the wiki, and will help when this enforcement is implemented ( JENKINS-23150 and related).
          Hide
          sambuc Lionel Sambuc added a comment -

          Thank you for replying back.

          I will do the update and check this in a few days, as we are currently testing a huge patch set.

          As I said previously, I would be satisfied with just a documentation update.

          Show
          sambuc Lionel Sambuc added a comment - Thank you for replying back. I will do the update and check this in a few days, as we are currently testing a huge patch set. As I said previously, I would be satisfied with just a documentation update.
          Hide
          kinow Bruno P. Kinoshita added a comment -

          Lionel, I've added some notes in the first paragraphs about this issue - https://wiki.jenkins-ci.org/display/JENKINS/TAP+Plugin

          Do you think that'd be enough for now? Thanks!

          Show
          kinow Bruno P. Kinoshita added a comment - Lionel, I've added some notes in the first paragraphs about this issue - https://wiki.jenkins-ci.org/display/JENKINS/TAP+Plugin Do you think that'd be enough for now? Thanks!
          Hide
          sambuc Lionel Sambuc added a comment -

          Hi,

          It is good for me. Had I had that information back then, I would have had our jenkins setup back to work in an hours or so after the upgrade.

          Thanks,

          Have a nice day

          Show
          sambuc Lionel Sambuc added a comment - Hi, It is good for me. Had I had that information back then, I would have had our jenkins setup back to work in an hours or so after the upgrade. Thanks, Have a nice day
          Hide
          sambuc Lionel Sambuc added a comment -

          The documentation update solves the issue for me.

          Show
          sambuc Lionel Sambuc added a comment - The documentation update solves the issue for me.
          sambuc Lionel Sambuc made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 161428 ] JNJira + In-Review [ 208483 ]
          cleclerc Cyrille Le Clerc made changes -
          Description Since I upgraded jenkins to the latest revision, the TAP plugin failed with:
          TAP Reports Processing: START
          Looking for TAP results report in workspace using pattern: out.tap
          Saving reports...
          Processing '/var/lib/jenkins/jobs/testrunner-x86-vm-cross/builds/1/tap-master-files/out.tap'
          Parsing TAP test result [/var/lib/jenkins/jobs/testrunner-x86-vm-cross/builds/1/tap-master-files/out.tap].
          ERROR: Publisher org.tap4j.plugin.TapPublisher aborted due to exception
          java.lang.NoClassDefFoundError: hudson/tasks/test/AbstractTestResultAction
          at java.lang.ClassLoader.defineClass1(Native Method)
          at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
          at jenkins.util.AntClassLoader.defineClassFromData(AntClassLoader.java:1138)
          at hudson.ClassicPluginStrategy$AntClassLoader2.defineClassFromData(ClassicPluginStrategy.java:799)
          at jenkins.util.AntClassLoader.getClassFromStream(AntClassLoader.java:1309)
          at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1365)
          at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1325)
          at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1078)
          at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
          at org.tap4j.plugin.TapPublisher.perform(TapPublisher.java:263)
          at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:32)
          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:1742)
          at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
          at hudson.model.ResourceController.execute(ResourceController.java:89)
          at hudson.model.Executor.run(Executor.java:240)
          Caused by: java.lang.ClassNotFoundException: hudson.tasks.test.AbstractTestResultAction
          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(ClassLoader.java:358)
          ... 19 more
          Finished: FAILURE

          I know my tap file is correct, I checked it validates with the given web service on the wiki page of the plugin. Also this used to work prior a Jenkins upgrade.

          You can access the full log at http://jenkins.minix3.org/job/testrunner-x86-vm-cross/1/console
          Since I upgraded jenkins to the latest revision, the TAP plugin failed with:

           
          {noformat}
          TAP Reports Processing: START Looking for TAP results report in workspace using pattern: out.tap Saving reports... Processing '/var/lib/jenkins/jobs/testrunner-x86-vm-cross/builds/1/tap-master-files/out.tap' Parsing TAP test result [/var/lib/jenkins/jobs/testrunner-x86-vm-cross/builds/1/tap-master-files/out.tap]. ERROR: Publisher org.tap4j.plugin.TapPublisher aborted due to exception java.lang.NoClassDefFoundError: hudson/tasks/test/AbstractTestResultAction at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:800) at jenkins.util.AntClassLoader.defineClassFromData(AntClassLoader.java:1138) at hudson.ClassicPluginStrategy$AntClassLoader2.defineClassFromData(ClassicPluginStrategy.java:799) at jenkins.util.AntClassLoader.getClassFromStream(AntClassLoader.java:1309) at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1365) at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1325) at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1078) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at org.tap4j.plugin.TapPublisher.perform(TapPublisher.java:263) at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:32) 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:1742) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:89) at hudson.model.Executor.run(Executor.java:240) Caused by: java.lang.ClassNotFoundException: hudson.tasks.test.AbstractTestResultAction 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(ClassLoader.java:358) ... 19 more Finished: FAILURE
          {noformat}
          I know my tap file is correct, I checked it validates with the given web service on the wiki page of the plugin. Also this used to work prior a Jenkins upgrade.

          You can access the full log at [http://jenkins.minix3.org/job/testrunner-x86-vm-cross/1/console]
          cleclerc Cyrille Le Clerc made changes -
          Description Since I upgraded jenkins to the latest revision, the TAP plugin failed with:

           
          {noformat}
          TAP Reports Processing: START Looking for TAP results report in workspace using pattern: out.tap Saving reports... Processing '/var/lib/jenkins/jobs/testrunner-x86-vm-cross/builds/1/tap-master-files/out.tap' Parsing TAP test result [/var/lib/jenkins/jobs/testrunner-x86-vm-cross/builds/1/tap-master-files/out.tap]. ERROR: Publisher org.tap4j.plugin.TapPublisher aborted due to exception java.lang.NoClassDefFoundError: hudson/tasks/test/AbstractTestResultAction at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:800) at jenkins.util.AntClassLoader.defineClassFromData(AntClassLoader.java:1138) at hudson.ClassicPluginStrategy$AntClassLoader2.defineClassFromData(ClassicPluginStrategy.java:799) at jenkins.util.AntClassLoader.getClassFromStream(AntClassLoader.java:1309) at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1365) at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1325) at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1078) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) at org.tap4j.plugin.TapPublisher.perform(TapPublisher.java:263) at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:32) 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:1742) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:89) at hudson.model.Executor.run(Executor.java:240) Caused by: java.lang.ClassNotFoundException: hudson.tasks.test.AbstractTestResultAction 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(ClassLoader.java:358) ... 19 more Finished: FAILURE
          {noformat}
          I know my tap file is correct, I checked it validates with the given web service on the wiki page of the plugin. Also this used to work prior a Jenkins upgrade.

          You can access the full log at [http://jenkins.minix3.org/job/testrunner-x86-vm-cross/1/console]
          Since I upgraded jenkins to the latest revision, the TAP plugin failed with:
          {noformat}
          TAP Reports Processing: START Looking for TAP results report in workspace using pattern: out.tap Saving reports... Processing '/var/lib/jenkins/jobs/testrunner-x86-vm-cross/builds/1/tap-master-files/out.tap'
          Parsing TAP test result [/var/lib/jenkins/jobs/testrunner-x86-vm-cross/builds/1/tap-master-files/out.tap].
          ERROR: Publisher org.tap4j.plugin.TapPublisher aborted due to exception
          java.lang.NoClassDefFoundError: hudson/tasks/test/AbstractTestResultAction
           at java.lang.ClassLoader.defineClass1(Native Method)
           at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
           at jenkins.util.AntClassLoader.defineClassFromData(AntClassLoader.java:1138)
           at hudson.ClassicPluginStrategy$AntClassLoader2.defineClassFromData(ClassicPluginStrategy.java:799)
           at jenkins.util.AntClassLoader.getClassFromStream(AntClassLoader.java:1309)
           at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1365)
           at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1325)
           at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1078)
           at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
           at org.tap4j.plugin.TapPublisher.perform(TapPublisher.java:263)
           at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:32)
           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:1742)
           at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
           at hudson.model.ResourceController.execute(ResourceController.java:89)
           at hudson.model.Executor.run(Executor.java:240) Caused by: java.lang.ClassNotFoundException: hudson.tasks.test.AbstractTestResultAction
           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(ClassLoader.java:358)
           ... 19 more
           Finished: FAILURE
          {noformat}
          I know my tap file is correct, I checked it validates with the given web service on the wiki page of the plugin. Also this used to work prior a Jenkins upgrade.

          You can access the full log at [http://jenkins.minix3.org/job/testrunner-x86-vm-cross/1/console]

            People

            Assignee:
            kinow Bruno P. Kinoshita
            Reporter:
            sambuc Lionel Sambuc
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: