[JIRA] [jira-plugin] (JENKINS-33293) (Jira) Updater throws NullPointerException for labels
Title: Message Title Radek Antoniuk resolved as Fixed Jenkins / JENKINS-33293 (Jira) Updater throws NullPointerException for labels Change By: Radek Antoniuk Status: Open Resolved Resolution: Fixed Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [jira-plugin] (JENKINS-33293) (Jira) Updater throws NullPointerException for labels
Title: Message Title SCM/JIRA link daemon commented on JENKINS-33293 Re: (Jira) Updater throws NullPointerException for labels Code changed in jenkins User: Julien Carsique Path: src/main/java/hudson/plugins/jira/Updater.java http://jenkins-ci.org/commit/jira-plugin/b6ba033b5ee3ee6cfe8362573f16891b2e9d4465 Log: JENKINS-33293: fix NPE on labels in Updater.submitComments() Duplicated by JENKINS-33551 Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [jira-plugin] (JENKINS-33293) (Jira) Updater throws NullPointerException for labels
Title: Message Title Julien Carsique commented on JENKINS-33293 Re: (Jira) Updater throws NullPointerException for labels There are two separate issues: NPE on labels is blocker for the comments. Fixed with https://github.com/jenkinsci/jira-plugin/pull/92 null labels come from somewhere; I couldn't quickly figure how. What are the labels? JIRA labels? Why would you hard-code it to master? The above fix simply initiates the labels as an empty list when the constructor is called with a null value, and it works fine as a preventive action without any unwanted behavior (see for instance https://jira.nuxeo.com/browse/NXP-18806 which has been properly updated by the jira plugin with that fix). I suggest to solve the current issue with such a fix https://github.com/jenkinsci/jira-plugin/pull/92. Then, create a dedicated issue for the labels if something does not work as expected. Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [jira-plugin] (JENKINS-33293) (Jira) Updater throws NullPointerException for labels
Title: Message Title knalli commented on JENKINS-33293 Re: (Jira) Updater throws NullPointerException for labels I think also for Updater.java itself the change is okay. null labels come from somewhere; I couldn't quickly figure how. What are the labels? JIRA labels? Node labels Well, I've fixed this setting a label for a job configuration setting called something like "run this job only if the following labels are applied to the build node). Actually, it was the only setting with "label" in its name which has came into my mind at this time (and it had worked). I'm absolutely not sure about the flow of these data attributes. Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [jira-plugin] (JENKINS-33293) (Jira) Updater throws NullPointerException for labels
Title: Message Title Julien Carsique edited a comment on JENKINS-33293 Re: (Jira) Updater throws NullPointerException for labels There are maybe two separate issues:- NPE on labels is blocker for the comments. Fixed with https://github.com/jenkinsci/jira-plugin/pull/92- null labels come from somewhere; I couldn't quickly figure how. What are the labels? JIRA labels? Why would you hard-code it to master? The above fix simply initiates the labels as an empty list when the constructor is called with a null value, and it works fine as a preventive action without any unwanted behavior (see for instance https://jira.nuxeo.com/browse/NXP-18806 which has been properly updated by the jira plugin with that fix). I suggest to solve the current issue with such a fix https://github.com/jenkinsci/jira-plugin/pull/92. Then, create a dedicated issue for the labels if something does not work as expected. Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [jira-plugin] (JENKINS-33293) (Jira) Updater throws NullPointerException for labels
Title: Message Title Radek Antoniuk assigned an issue to Radek Antoniuk Jenkins / JENKINS-33293 (Jira) Updater throws NullPointerException for labels Change By: Radek Antoniuk Assignee: Radek Antoniuk Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [jira-plugin] (JENKINS-33293) (Jira) Updater throws NullPointerException for labels
Title: Message Title Radek Antoniuk commented on JENKINS-33293 Re: (Jira) Updater throws NullPointerException for labels So, the only explanation would be JiraIssueUpdater.java:97. I'm just wondering if that's the case that this update was "delayed" and processed via Aggregator. Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [jira-plugin] (JENKINS-33293) (Jira) Updater throws NullPointerException for labels
Title: Message Title Radek Antoniuk updated an issue Jenkins / JENKINS-33293 (Jira) Updater throws NullPointerException for labels Change By: Radek Antoniuk Labels: jira-plugin-2.2.1 Add Comment This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265) -- You received this message because you are subscribed to the Google Groups "Jenkins Issues" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[JIRA] [jira-plugin] (JENKINS-33293) (Jira) Updater throws NullPointerException for labels
Title: Message Title knalli updated an issue Jenkins / JENKINS-33293 (Jira) Updater throws NullPointerException for labels Change 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 performWARNING: 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. And this is only possible, if the constructor has been filled with that one. * 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. Add Comment
[JIRA] [jira-plugin] (JENKINS-33293) (Jira) Updater throws NullPointerException for labels
Title: Message Title knalli updated an issue Jenkins / JENKINS-33293 (Jira) Updater throws NullPointerException for labels Change 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 performWARNING: 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. And this is only possible, if the constructor has been filled with that one.* 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. Add Comment
[JIRA] [jira-plugin] (JENKINS-33293) (Jira) Updater throws NullPointerException for labels
Title: Message Title knalli created an issue Jenkins / JENKINS-33293 (Jira) Updater throws NullPointerException for labels Issue Type: Bug Assignee: Unassigned Components: jira-plugin Created: 03/Mar/16 12:25 PM Environment: RHEL5 Jenkins ver. 1.642.2 Jira Plugin 2.2 Jenkins Job with an empty box of labels (and no checkmark) Priority: Minor Reporter: knalli Under a special job configuration situation the plugin throws an exception 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