java.lang.IllegalArgumentException: 'incidentKey' must not be blank. Was: ''

Google Groups | jaco...@gmail.com (JIRA) | 9 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    When resolving an incident: {code} Resolving incident ERROR: Build step failed with exception java.lang.NullPointerException at org.jenkinsci.plugins.pagerduty.PagerDutyTrigger.resolveIncident(PagerDutyTrigger.java:225) at org.jenkinsci.plugins.pagerduty.PagerDutyTrigger.perform(PagerDutyTrigger.java:213) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726) at hudson.model.Build$BuildExecution.post2(Build.java:185) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671) at hudson.model.Run.execute(Run.java:1766) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:408) Build step 'PagerDuty Incident Trigger' marked build as failure Finished: FAILURE {code} When attempting to create one: {code} ERROR: Tried to trigger PD with apiKey = [***] java.lang.NullPointerException at org.jenkinsci.plugins.pagerduty.PagerDutyTrigger.triggerPagerDuty(PagerDutyTrigger.java:266) at org.jenkinsci.plugins.pagerduty.PagerDutyTrigger.perform(PagerDutyTrigger.java:210) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726) at hudson.model.Build$BuildExecution.post2(Build.java:185) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671) at hudson.model.Run.execute(Run.java:1766) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:408) Build step 'PagerDuty Incident Trigger' marked build as failure Finished: FAILURE {code} I thought maybe the issue was that the incidentKey didn't exist in PagerDuty? I assumed you could create an ad-hoc key and it would map to a consistent incident (otherwise I'm not sure how a subsequent resolveIncident would correlate an incident triggered from a previous trigger to a new one). The contextual help bubble says: *PagerDuty incident id if available (otherwise it will create one).* If I leave the incidentKey field blank: {code} java.lang.IllegalArgumentException: 'incidentKey' must not be blank. Was: '' at com.squareup.pagerduty.incidents.Util.checkArgument(Util.java:39) at com.squareup.pagerduty.incidents.Util.checkStringArgument(Util.java:26) at com.squareup.pagerduty.incidents.Resolution$Builder.<init>(Resolution.java:44) at org.jenkinsci.plugins.pagerduty.PagerDutyTrigger.resolveIncident(PagerDutyTrigger.java:220) at org.jenkinsci.plugins.pagerduty.PagerDutyTrigger.perform(PagerDutyTrigger.java:213) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726) at hudson.model.Build$BuildExecution.post2(Build.java:185) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671) at hudson.model.Run.execute(Run.java:1766) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:408) Build step 'PagerDuty Incident Trigger' marked build as failure Finished: FAILURE {code} Set to major in the context of this plugin. Certainly not a major loss to Jenkins overall! We're trying to use the plugin to drive periodic acceptance tests - when a sequence of API interactions fails, the build fails, we get an alert. We want this to run every 5 minutes. If a subsequent run succeeds the incident should be resolved automatically. Jenkins Version: 1.6.3 Pagerduty Plugin Version: 0.2.4

    Jenkins JIRA | 9 months ago | Jacob Straszynski
    java.lang.IllegalArgumentException: 'incidentKey' must not be blank. Was: ''
  2. 0

    [JIRA] [pagerduty-plugin] (JENKINS-34922) NullPointerException Creating and Resolving Issues

    Google Groups | 9 months ago | jaco...@gmail.com (JIRA)
    java.lang.IllegalArgumentException: 'incidentKey' must not be blank. Was: ''
  3. 0

    When resolving an incident: {code} Resolving incident ERROR: Build step failed with exception java.lang.NullPointerException at org.jenkinsci.plugins.pagerduty.PagerDutyTrigger.resolveIncident(PagerDutyTrigger.java:225) at org.jenkinsci.plugins.pagerduty.PagerDutyTrigger.perform(PagerDutyTrigger.java:213) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726) at hudson.model.Build$BuildExecution.post2(Build.java:185) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671) at hudson.model.Run.execute(Run.java:1766) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:408) Build step 'PagerDuty Incident Trigger' marked build as failure Finished: FAILURE {code} When attempting to create one: {code} ERROR: Tried to trigger PD with apiKey = [***] java.lang.NullPointerException at org.jenkinsci.plugins.pagerduty.PagerDutyTrigger.triggerPagerDuty(PagerDutyTrigger.java:266) at org.jenkinsci.plugins.pagerduty.PagerDutyTrigger.perform(PagerDutyTrigger.java:210) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726) at hudson.model.Build$BuildExecution.post2(Build.java:185) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671) at hudson.model.Run.execute(Run.java:1766) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:408) Build step 'PagerDuty Incident Trigger' marked build as failure Finished: FAILURE {code} I thought maybe the issue was that the incidentKey didn't exist in PagerDuty? I assumed you could create an ad-hoc key and it would map to a consistent incident (otherwise I'm not sure how a subsequent resolveIncident would correlate an incident triggered from a previous trigger to a new one). The contextual help bubble says: *PagerDuty incident id if available (otherwise it will create one).* If I leave the incidentKey field blank: {code} java.lang.IllegalArgumentException: 'incidentKey' must not be blank. Was: '' at com.squareup.pagerduty.incidents.Util.checkArgument(Util.java:39) at com.squareup.pagerduty.incidents.Util.checkStringArgument(Util.java:26) at com.squareup.pagerduty.incidents.Resolution$Builder.<init>(Resolution.java:44) at org.jenkinsci.plugins.pagerduty.PagerDutyTrigger.resolveIncident(PagerDutyTrigger.java:220) at org.jenkinsci.plugins.pagerduty.PagerDutyTrigger.perform(PagerDutyTrigger.java:213) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726) at hudson.model.Build$BuildExecution.post2(Build.java:185) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671) at hudson.model.Run.execute(Run.java:1766) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:408) Build step 'PagerDuty Incident Trigger' marked build as failure Finished: FAILURE {code} Set to major in the context of this plugin. Certainly not a major loss to Jenkins overall! We're trying to use the plugin to drive periodic acceptance tests - when a sequence of API interactions fails, the build fails, we get an alert. We want this to run every 5 minutes. If a subsequent run succeeds the incident should be resolved automatically. Jenkins Version: 1.6.3 Pagerduty Plugin Version: 0.2.4

    Jenkins JIRA | 9 months ago | Jacob Straszynski
    java.lang.IllegalArgumentException: 'incidentKey' must not be blank. Was: ''
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    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.IllegalArgumentException

      'incidentKey' must not be blank. Was: ''

      at com.squareup.pagerduty.incidents.Util.checkArgument()
    2. com.squareup.pagerduty
      Resolution$Builder.<init>
      1. com.squareup.pagerduty.incidents.Util.checkArgument(Util.java:39)
      2. com.squareup.pagerduty.incidents.Util.checkStringArgument(Util.java:26)
      3. com.squareup.pagerduty.incidents.Resolution$Builder.<init>(Resolution.java:44)
      3 frames
    3. org.jenkinsci.plugins
      PagerDutyTrigger.perform
      1. org.jenkinsci.plugins.pagerduty.PagerDutyTrigger.resolveIncident(PagerDutyTrigger.java:220)
      2. org.jenkinsci.plugins.pagerduty.PagerDutyTrigger.perform(PagerDutyTrigger.java:213)
      2 frames
    4. Hudson
      Executor.run
      1. hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      2. hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
      3. hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:726)
      4. hudson.model.Build$BuildExecution.post2(Build.java:185)
      5. hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:671)
      6. hudson.model.Run.execute(Run.java:1766)
      7. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      8. hudson.model.ResourceController.execute(ResourceController.java:98)
      9. hudson.model.Executor.run(Executor.java:408)
      9 frames