java.lang.NullPointerException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • [JIRA] [jira-plugin] (JENKINS-33551) Error updating JIRA issues
    via by jcarsique@java.net (JIRA),
  • 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}
    via by Julien Carsique,
  • 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}
    via by Julien Carsique,
  • 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.
    via by knalli,
  • 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.
    via by knalli,
    • 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)
    No Bugmate found.