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

NullPointerException in Postbuild action for matrix child

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: postbuildscript-plugin
    • Labels:
      None
    • Environment:
      Ubuntu 10.04, Jenkins 1.500, Jenkins Post-Build Script Plug-in 0.10
    • Similar Issues:

      Description

      PostBuildScript gives NullPointerException for matrix child jobs, Works ok for parent job.

      From parent log:

      Triggering value1
      Triggering value2
      value1 completed with result SUCCESS
      value2 completed with result SUCCESS
      [PostBuildScript] - Execution post build scripts.
      [workspace] $ /bin/sh -xe /tmp/hudson4750159053349493502.sh
      + echo Post-build action, build step, Execute shell
      Post-build action, build step, Execute shell
      + echo PREPARED_ENV_VAR =
      PREPARED_ENV_VAR =
      + echo GENERATED_ENV_VAR_FROM_SCRIPT =
      GENERATED_ENV_VAR_FROM_SCRIPT =
      + echo INJECTED_ENV_VAR =
      INJECTED_ENV_VAR =
      Finished: SUCCESS

      From child log:
      ...
      [EnvInject] - Script executed successfully.
      [value1] $ /bin/sh -xe /tmp/hudson4061121161659393893.sh
      + echo Build, Execute shell
      Build, Execute shell
      + echo PREPARED_ENV_VAR =
      PREPARED_ENV_VAR =
      + echo GENERATED_ENV_VAR_FROM_SCRIPT = yes
      GENERATED_ENV_VAR_FROM_SCRIPT = yes
      + echo INJECTED_ENV_VAR =
      INJECTED_ENV_VAR =
      Finished: SUCCESS

      From system log_
      2013-feb-12 11:02:32 hudson.model.Run execute
      INFO: magjac-matrix-test #4 main build action completed: SUCCESS

      2013-feb-12 11:02:31 hudson.model.Run execute
      INFO: magjac-matrix-test » value1 #4 main build action completed: SUCCESS

      2013-feb-12 11:02:31 hudson.model.Run execute
      INFO: magjac-matrix-test » value2 #4 main build action completed: SUCCESS

      2013-feb-12 11:02:31 hudson.model.listeners.RunListener report
      VARNING: RunListener failed
      java.lang.NullPointerException
      at org.jenkinsci.plugins.postbuildscript.PostBuildScriptListener.putLastListPostBuildPublisher(PostBuildScriptListener.java:51)
      at org.jenkinsci.plugins.postbuildscript.PostBuildScriptListener.onStarted(PostBuildScriptListener.java:36)
      at hudson.model.listeners.RunListener.fireStarted(RunListener.java:195)
      at hudson.model.Run.execute(Run.java:1552)
      at hudson.matrix.MatrixRun.run(MatrixRun.java:146)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:236)

      2013-feb-12 11:02:31 hudson.model.listeners.RunListener report
      VARNING: RunListener failed
      java.lang.NullPointerException
      at org.jenkinsci.plugins.postbuildscript.PostBuildScriptListener.putLastListPostBuildPublisher(PostBuildScriptListener.java:51)
      at org.jenkinsci.plugins.postbuildscript.PostBuildScriptListener.onStarted(PostBuildScriptListener.java:36)
      at hudson.model.listeners.RunListener.fireStarted(RunListener.java:195)
      at hudson.model.Run.execute(Run.java:1552)
      at hudson.matrix.MatrixRun.run(MatrixRun.java:146)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:236)

      2013-feb-12 11:00:08 hudson.model.Run execute
      INFO: magjac-trig-test #3 main build action completed: SUCCESS

        Attachments

          Activity

          Hide
          magjac Magnus Jacobsson added a comment -

          Occurs also with Jenkins 1.501.

          Show
          magjac Magnus Jacobsson added a comment - Occurs also with Jenkins 1.501.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Gregory Boissinot
          Path:
          src/main/java/org/jenkinsci/plugins/postbuildscript/PostBuildScriptListener.java
          http://jenkins-ci.org/commit/postbuildscript-plugin/735c66001f7e890c29c62b270a2ceb66432df070
          Log:
          Check publishers null for JENKINS-16772

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Gregory Boissinot Path: src/main/java/org/jenkinsci/plugins/postbuildscript/PostBuildScriptListener.java http://jenkins-ci.org/commit/postbuildscript-plugin/735c66001f7e890c29c62b270a2ceb66432df070 Log: Check publishers null for JENKINS-16772
          Hide
          gbois Gregory Boissinot added a comment -

          I can't reproduce the issue.
          Please could you try to isolate the issue and send me your config.xml or a complete zip file.
          Waiting for it, I add a check to avoid NullPointerException.
          Thanks

          Show
          gbois Gregory Boissinot added a comment - I can't reproduce the issue. Please could you try to isolate the issue and send me your config.xml or a complete zip file. Waiting for it, I add a check to avoid NullPointerException. Thanks
          Hide
          magjac Magnus Jacobsson added a comment -

          Job config file showing the problem.

          Show
          magjac Magnus Jacobsson added a comment - Job config file showing the problem.
          Hide
          magjac Magnus Jacobsson added a comment -

          @Gregory: Did you manage to reproduce the problem?

          Since your fix, there's no NPE anymore, but the PostBuildScript still doesn't execute for the matrix child. Shouldn't it do that?

          Show
          magjac Magnus Jacobsson added a comment - @Gregory: Did you manage to reproduce the problem? Since your fix, there's no NPE anymore, but the PostBuildScript still doesn't execute for the matrix child. Shouldn't it do that?
          Hide
          krislodz Kris Slowinski added a comment -

          I can reproduce the exception from Jenkins 1.499 by creating a multi-configuration project and trying to execute Groovy command as a build step. The execution is successful but when trying to access any configuration I get a Status Code:404 page and the system log displays the exception with the stack trace from that issue. Any ideas if it was fixed in the newer versions?

          Show
          krislodz Kris Slowinski added a comment - I can reproduce the exception from Jenkins 1.499 by creating a multi-configuration project and trying to execute Groovy command as a build step. The execution is successful but when trying to access any configuration I get a Status Code:404 page and the system log displays the exception with the stack trace from that issue. Any ideas if it was fixed in the newer versions?
          Hide
          gbois Gregory Boissinot added a comment -

          Please test from 0.14

          Show
          gbois Gregory Boissinot added a comment - Please test from 0.14

            People

            • Assignee:
              gbois Gregory Boissinot
              Reporter:
              magjac Magnus Jacobsson
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: