java.lang.NullPointerException

Jenkins JIRA | knalli | 9 months ago
  1. 0

    [JIRA] [jira-plugin] (JENKINS-33293) (Jira) Updater throws NullPointerException for labels

    Google Groups | 9 months ago | knalli@java.net (JIRA)
    java.lang.NullPointerException
  2. 0

    Under a special job configuration situation the plugin throws an exception when commenting issues {code:language=java|collapse=true} 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) {code} 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: * [Updater.java:177|https://github.com/jenkinsci/jira-plugin/blob/870363799336ddf528d4772c430a12fff172b0e9/src/main/java/hudson/plugins/jira/Updater.java#L177] can only throw a NPE if {{labels}} is NULL. * As far as I read this right, the [JiraIssueUpdater:61-67|https://github.com/jenkinsci/jira-plugin/blob/870363799336ddf528d4772c430a12fff172b0e9/src/main/java/hudson/plugins/jira/JiraIssueUpdater.java#L61-L67] is in charge. 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.

    Jenkins JIRA | 9 months ago | knalli
    java.lang.NullPointerException
  3. 0

    Under a special job configuration situation the plugin throws an exception when commenting issues {code:language=java|collapse=true} 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) {code} 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: * [Updater.java:177|https://github.com/jenkinsci/jira-plugin/blob/870363799336ddf528d4772c430a12fff172b0e9/src/main/java/hudson/plugins/jira/Updater.java#L177] can only throw a NPE if {{labels}} is NULL. * As far as I read this right, the [JiraIssueUpdater:61-67|https://github.com/jenkinsci/jira-plugin/blob/870363799336ddf528d4772c430a12fff172b0e9/src/main/java/hudson/plugins/jira/JiraIssueUpdater.java#L61-L67] is in charge. 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.

    Jenkins JIRA | 9 months ago | knalli
    java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [JIRA] [jira-plugin] (JENKINS-33551) Error updating JIRA issues

    Google Groups | 9 months ago | jcarsique@java.net (JIRA)
    java.lang.NullPointerException
  6. 0

    An NPE is raised while updating JIRA issues. The comment is wrote on JIRA but the NPE makes the plugin continuously write the same comment and remember the issues for the next build. {code}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.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1047) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668) at hudson.model.Run.execute(Run.java:1763) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:410) {code} That seems to happen on {{labels.isEmpty()}} even if I can't figure how: {code}172 session.addComment( 173 issue.id, 174 createComment(build, useWikiStyleComments, jenkinsRootUrl, recordScmChanges, issue), 175 groupVisibility, roleVisibility 176 ); 177 if (!labels.isEmpty()) { 178 session.addLabels(issue.id, labels); 179 }{code}

    Jenkins JIRA | 9 months ago | Julien Carsique
    java.lang.NullPointerException

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at hudson.plugins.jira.Updater.submitComments()
    2. Hudson JIRA plugin
      JiraIssueUpdater.perform
      1. hudson.plugins.jira.Updater.submitComments(Updater.java:177)
      2. hudson.plugins.jira.Updater.perform(Updater.java:128)
      3. hudson.plugins.jira.JiraIssueUpdater.perform(JiraIssueUpdater.java:64)
      3 frames
    3. Hudson
      Executor.run
      1. hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
      2. hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:45)
      3. hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
      4. hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
      5. hudson.model.Build$BuildExecution.post2(Build.java:185)
      6. hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
      7. hudson.model.Run.execute(Run.java:1763)
      8. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      9. hudson.model.ResourceController.execute(ResourceController.java:98)
      10. hudson.model.Executor.run(Executor.java:410)
      10 frames