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

(Jira) Updater throws NullPointerException for labels

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • jira-plugin
    • RHEL5
      Jenkins ver. 1.642.2
      Jira Plugin 2.2
      Jenkins Job with an empty box of labels (and no checkmark)

      Under a special job configuration situation the plugin throws an exception when commenting issues

      Mar 03, 2016 12:49:06 PM hudson.plugins.jira.Updater perform
      WARNING: Error updating JIRA issues. Saving issues for next build.
      java.lang.NullPointerException
      	at hudson.plugins.jira.Updater.submitComments(Updater.java:177)
      	at hudson.plugins.jira.Updater.perform(Updater.java:128)
      	at hudson.plugins.jira.JiraIssueUpdater.perform(JiraIssueUpdater.java:64)
      	at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
      	at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
      	at hudson.model.Build$BuildExecution.post2(Build.java:185)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
      	at hudson.model.Run.execute(Run.java:1763)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:98)
      	at hudson.model.Executor.run(Executor.java:410)
      

      As this do not change the job result, we had not noticed that at the beginning. However, this exception results into not saving the state (i.e. commenting on prior Jira issues). And this results into re-commenting on the same issue on every subsequented build.

      I've tracked down the exception a bit:

      That's weired, because JiraIssueUpdate's contructor ensures the non-nullability of labels already. Does the plugin can be created bypassing the specific constructor? Otherwise it does not explain how labels can be null.

      My workaround is setting master as a label (which is okay for me). But it looks definitely like bug.

            warden Radek Antoniuk
            knalli knalli
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: