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

Promotion fails with NullPointerException

XMLWordPrintable

      As discussed in https://wiki.jenkins-ci.org/display/JENKINS/Promoted+Builds+Plugin?focusedCommentId=56459274#comment-56459274,


      What is "Pending promotion (promotion not queued. Please re-execute promotion)" ?

      I have set up a job, with Manually Approved promotion, that sends an Editable Email Notification and builds another project upon Promotion. I then did a few builds. When I go to the /server:8080/job/my-job/42/promotion/? page and click the Approve button, I see the message "Pending promotion (promotion queued)". When I refresh the page, then I see "Pending promotion (promotion not queued. Please re-execute promotion)". The email never gets sent and the other job does not get kicked off. I don't see any errors in the system log. Any ideas ?


      I've got a similar problem.  I've downgraded to 1.11 for the time being, but the logs for the promotion are typically in the main hudson directory under jobs%JobName%\promotions%promotionName%\builds%BuildTimestamp%\

      For this error the only thing I'm seeing in the logs is:

      Legacy code started this job.  No cause information is available
      FATAL: null
      java.lang.NullPointerException
          at hudson.plugins.promoted_builds.Promotion.getUrl(Promotion.java:61)
          at hudson.model.Run.getEnvironment(Run.java:1771)
          at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:725)
          at hudson.plugins.promoted_builds.Promotion.getEnvironment(Promotion.java:74)
          at hudson.plugins.promoted_builds.Promotion$RunnerImpl.decideWorkspace(Promotion.java:107)
          at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:409)
          at hudson.model.Run.run(Run.java:1362)
          at hudson.plugins.promoted_builds.Promotion.run(Promotion.java:93)
          at hudson.model.ResourceController.execute(ResourceController.java:88)
          at hudson.model.Executor.run(Executor.java:145)
      

      Though there is a long line of characters before the null pointer exception.  As far as I can see, it looks like one of the targets where it creates the URL is failing, but I'm really not sure.  I'm trying to play around with it a bit more before putting in the ticket, but if anyone has more info, please feel free to share.


            Unassigned Unassigned
            kohsuke Kohsuke Kawaguchi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: