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

Pipeline integration: TAP Extended Test Results throws NullPointerException

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Tests work fine and TAP file is correctly parsed. When I press the TAP Extended Test Results however, I get a NullPointerException

      Stack trace:

      javax.servlet.ServletException: java.lang.NullPointerException
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:796)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
      at org.kohsuke.stapler.MetaClass$11.dispatch(MetaClass.java:380)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
      at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:233)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
      at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:233)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
      at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:233)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
      at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135)
      at com.cloudbees.jenkins.support.slowrequest.SlowRequestFilter.doFilter(SlowRequestFilter.java:38)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
      at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:201)
      at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:178)
      at net.bull.javamelody.PluginMonitoringFilter.doFilter(PluginMonitoringFilter.java:85)
      at org.jvnet.hudson.plugins.monitoring.HudsonMonitoringFilter.doFilter(HudsonMonitoringFilter.java:104)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
      at jenkins.metrics.impl.MetricsFilter.doFilter(MetricsFilter.java:125)
      at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
      at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:126)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:86)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
      at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
      at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
      at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
      at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
      at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
      at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:553)
      at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
      at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
      at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
      at org.eclipse.jetty.server.Server.handle(Server.java:499)
      at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
      at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
      at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
      at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.NullPointerException
      at org.tap4j.plugin.TapProjectAction.getLastBuildWithTap(TapProjectAction.java:109)
      at org.tap4j.plugin.TapProjectAction.doIndex(TapProjectAction.java:118)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:324)
      at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:167)
      at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:100)
      at org.kohsuke.stapler.IndexDispatcher.dispatch(IndexDispatcher.java:26)
      at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
      ... 78 more

        Attachments

          Activity

          Hide
          oleg_nenashev Oleg Nenashev added a comment - - edited

          Well, the plugin is just not integrated with Jenkins Pipeline from what I see. https://github.com/jenkinsci/tap-plugin/blob/bc46bc5d413cbb139a4c0931752f42a594728cd8/src/main/java/org/tap4j/plugin/TapProjectAction.java#L109 . This code is not going to work since WorkflowJob is not Abstract project. Can likely fix it in a couple of hours when I arrive back home

          Show
          oleg_nenashev Oleg Nenashev added a comment - - edited Well, the plugin is just not integrated with Jenkins Pipeline from what I see. https://github.com/jenkinsci/tap-plugin/blob/bc46bc5d413cbb139a4c0931752f42a594728cd8/src/main/java/org/tap4j/plugin/TapProjectAction.java#L109 . This code is not going to work since WorkflowJob is not Abstract project. Can likely fix it in a couple of hours when I arrive back home
          Hide
          kinow Bruno P. Kinoshita added a comment -

          Oleg Nenashev, the initial pipeline support was added by https://github.com/jenkinsci/tap-plugin/pull/12

          I merged and released (RERO), but am actually working on another branch with performance enhancements, and planning a release in a few weeks. If you could submit a pull request, that way it will be easier to merge & integrate your change, with no risk of me accidentally removing it while merging the branch.

          Show
          kinow Bruno P. Kinoshita added a comment - Oleg Nenashev , the initial pipeline support was added by https://github.com/jenkinsci/tap-plugin/pull/12 I merged and released (RERO), but am actually working on another branch with performance enhancements, and planning a release in a few weeks. If you could submit a pull request, that way it will be easier to merge & integrate your change, with no risk of me accidentally removing it while merging the branch.
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          @Bruno Yes i Can do such fix. Do you recommend creating a pull-request against the master branch or against your branch with performance changes?

          Show
          oleg_nenashev Oleg Nenashev added a comment - @Bruno Yes i Can do such fix. Do you recommend creating a pull-request against the master branch or against your branch with performance changes?
          Hide
          kinow Bruno P. Kinoshita added a comment -

          Against master, please. So if I take too long to finish working on the performance changes, I'll merge it and cut a new release.

          Show
          kinow Bruno P. Kinoshita added a comment - Against master, please. So if I take too long to finish working on the performance changes, I'll merge it and cut a new release.
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          https://github.com/jenkinsci/tap-plugin/pull/14 likely addresses the issue. IMHO the pull request needs some love before merging

          Show
          oleg_nenashev Oleg Nenashev added a comment - https://github.com/jenkinsci/tap-plugin/pull/14 likely addresses the issue. IMHO the pull request needs some love before merging
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Bruno P. Kinoshita
          Path:
          pom.xml
          src/main/java/org/tap4j/plugin/TapProjectAction.java
          src/main/java/org/tap4j/plugin/TapTestResultAction.java
          src/main/java/org/tap4j/plugin/model/TapStreamResult.java
          src/main/java/org/tap4j/plugin/model/TapTestResultResult.java
          src/main/java/org/tap4j/plugin/util/GraphHelper.java
          src/main/resources/index.jelly
          src/main/resources/org/tap4j/plugin/TapBuildAction/summary.jelly
          src/main/resources/org/tap4j/plugin/TapProjectAction/floatingBox.jelly
          src/main/resources/org/tap4j/plugin/TapProjectAction/nodata.jelly
          src/main/resources/org/tap4j/plugin/TapProjectAction/sidepanel.jelly
          src/main/resources/org/tap4j/plugin/TapResult/contents.jelly
          src/main/resources/org/tap4j/plugin/TapResult/index.jelly
          src/test/java/org/tap4j/plugin/PublishersCombinationTest.java
          src/test/java/org/tap4j/plugin/util/GraphHelperTest.java
          src/test/resources/org/tap4j/plugin/PublishersCombinationTest.zip
          src/test/resources/org/tap4j/plugin/util/GraphHelperTest.zip
          http://jenkins-ci.org/commit/tap-plugin/b39c1fdea728cf43ba24a4a424742a891e30a7f8
          Log:
          Merge branch 'pr/14'

          JENKINS-38149: merge part-2 of this issue, thanks to @anenviousguest and @oleg-nenashev

          Compare: https://github.com/jenkinsci/tap-plugin/compare/2044059d11f9...b39c1fdea728

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Bruno P. Kinoshita Path: pom.xml src/main/java/org/tap4j/plugin/TapProjectAction.java src/main/java/org/tap4j/plugin/TapTestResultAction.java src/main/java/org/tap4j/plugin/model/TapStreamResult.java src/main/java/org/tap4j/plugin/model/TapTestResultResult.java src/main/java/org/tap4j/plugin/util/GraphHelper.java src/main/resources/index.jelly src/main/resources/org/tap4j/plugin/TapBuildAction/summary.jelly src/main/resources/org/tap4j/plugin/TapProjectAction/floatingBox.jelly src/main/resources/org/tap4j/plugin/TapProjectAction/nodata.jelly src/main/resources/org/tap4j/plugin/TapProjectAction/sidepanel.jelly src/main/resources/org/tap4j/plugin/TapResult/contents.jelly src/main/resources/org/tap4j/plugin/TapResult/index.jelly src/test/java/org/tap4j/plugin/PublishersCombinationTest.java src/test/java/org/tap4j/plugin/util/GraphHelperTest.java src/test/resources/org/tap4j/plugin/PublishersCombinationTest.zip src/test/resources/org/tap4j/plugin/util/GraphHelperTest.zip http://jenkins-ci.org/commit/tap-plugin/b39c1fdea728cf43ba24a4a424742a891e30a7f8 Log: Merge branch 'pr/14' JENKINS-38149 : merge part-2 of this issue, thanks to @anenviousguest and @oleg-nenashev Compare: https://github.com/jenkinsci/tap-plugin/compare/2044059d11f9...b39c1fdea728
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          It is fixed in Tap Plugin 2.1

          Show
          oleg_nenashev Oleg Nenashev added a comment - It is fixed in Tap Plugin 2.1
          Hide
          kinow Bruno P. Kinoshita added a comment -

          Thanks for updating the ticket Oleg!

          Show
          kinow Bruno P. Kinoshita added a comment - Thanks for updating the ticket Oleg!

            People

            Assignee:
            oleg_nenashev Oleg Nenashev
            Reporter:
            olofk Olof Kindgren
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: