java.lang.NumberFormatException: For input string: "null"

Jenkins JIRA | Daniel Spilker | 3 years 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

    The following DSL script (which is an example from the docs) causes an exception. {code} job { name('test') triggers { gerrit { events { ChangeMerged DraftPublished } project('reg_exp:myProject', ['ant:feature-branch', 'plain:origin/refs/mybranch']) project('test-project', '**') buildSuccessful(10, null) } } } {code} {noformat} java.lang.NumberFormatException: For input string: "null" at java_lang_Integer$parseInt$0.call(Unknown Source) at javaposse.jobdsl.dsl.helpers.triggers.GerritContext.buildSuccessful(GerritContext.groovy:46) at script14113052380471783888867$_run_closure1_closure2_closure3.doCall(script14113052380471783888867.groovy:10) at script14113052380471783888867$_run_closure1_closure2_closure3.doCall(script14113052380471783888867.groovy) at javaposse.jobdsl.dsl.helpers.AbstractContextHelper.executeInContext(AbstractContextHelper.groovy:21) at javaposse.jobdsl.dsl.helpers.AbstractContextHelper$executeInContext$0.call(Unknown Source) at javaposse.jobdsl.dsl.helpers.triggers.TriggerContext.gerrit(TriggerContext.groovy:201) at script14113052380471783888867$_run_closure1_closure2.doCall(script14113052380471783888867.groovy:3) at script14113052380471783888867$_run_closure1_closure2.doCall(script14113052380471783888867.groovy) at javaposse.jobdsl.dsl.helpers.AbstractContextHelper.executeInContext(AbstractContextHelper.groovy:21) at javaposse.jobdsl.dsl.helpers.AbstractContextHelper$executeInContext$0.callStatic(Unknown Source) at javaposse.jobdsl.dsl.helpers.AbstractContextHelper.execute(AbstractContextHelper.groovy:32) at javaposse.jobdsl.dsl.helpers.AbstractContextHelper$execute.callCurrent(Unknown Source) at javaposse.jobdsl.dsl.helpers.triggers.TriggerContextHelper.triggers(TriggerContextHelper.groovy:21) at javaposse.jobdsl.dsl.helpers.triggers.TriggerContextHelper$triggers.call(Unknown Source) at javaposse.jobdsl.dsl.Job.triggers(Job.groovy) at script14113052380471783888867$_run_closure1.doCall(script14113052380471783888867.groovy:2) at javaposse.jobdsl.dsl.JobParent.job(JobParent.groovy:32) at javaposse.jobdsl.dsl.JobParent.job(JobParent.groovy) at javaposse.jobdsl.dsl.DslFactory$job.callCurrent(Unknown Source) at script14113052380471783888867.run(script14113052380471783888867.groovy:1) at javaposse.jobdsl.dsl.DslScriptLoader.runDslEngineForParent(DslScriptLoader.java:69) at javaposse.jobdsl.dsl.DslScriptLoader$runDslEngineForParent.call(Unknown Source) ... {noformat}

    Jenkins JIRA | 3 years ago | Daniel Spilker
    java.lang.NumberFormatException: For input string: "null"
  2. 0

    The following DSL script (which is an example from the docs) causes an exception. {code} job { name('test') triggers { gerrit { events { ChangeMerged DraftPublished } project('reg_exp:myProject', ['ant:feature-branch', 'plain:origin/refs/mybranch']) project('test-project', '**') buildSuccessful(10, null) } } } {code} {noformat} java.lang.NumberFormatException: For input string: "null" at java_lang_Integer$parseInt$0.call(Unknown Source) at javaposse.jobdsl.dsl.helpers.triggers.GerritContext.buildSuccessful(GerritContext.groovy:46) at script14113052380471783888867$_run_closure1_closure2_closure3.doCall(script14113052380471783888867.groovy:10) at script14113052380471783888867$_run_closure1_closure2_closure3.doCall(script14113052380471783888867.groovy) at javaposse.jobdsl.dsl.helpers.AbstractContextHelper.executeInContext(AbstractContextHelper.groovy:21) at javaposse.jobdsl.dsl.helpers.AbstractContextHelper$executeInContext$0.call(Unknown Source) at javaposse.jobdsl.dsl.helpers.triggers.TriggerContext.gerrit(TriggerContext.groovy:201) at script14113052380471783888867$_run_closure1_closure2.doCall(script14113052380471783888867.groovy:3) at script14113052380471783888867$_run_closure1_closure2.doCall(script14113052380471783888867.groovy) at javaposse.jobdsl.dsl.helpers.AbstractContextHelper.executeInContext(AbstractContextHelper.groovy:21) at javaposse.jobdsl.dsl.helpers.AbstractContextHelper$executeInContext$0.callStatic(Unknown Source) at javaposse.jobdsl.dsl.helpers.AbstractContextHelper.execute(AbstractContextHelper.groovy:32) at javaposse.jobdsl.dsl.helpers.AbstractContextHelper$execute.callCurrent(Unknown Source) at javaposse.jobdsl.dsl.helpers.triggers.TriggerContextHelper.triggers(TriggerContextHelper.groovy:21) at javaposse.jobdsl.dsl.helpers.triggers.TriggerContextHelper$triggers.call(Unknown Source) at javaposse.jobdsl.dsl.Job.triggers(Job.groovy) at script14113052380471783888867$_run_closure1.doCall(script14113052380471783888867.groovy:2) at javaposse.jobdsl.dsl.JobParent.job(JobParent.groovy:32) at javaposse.jobdsl.dsl.JobParent.job(JobParent.groovy) at javaposse.jobdsl.dsl.DslFactory$job.callCurrent(Unknown Source) at script14113052380471783888867.run(script14113052380471783888867.groovy:1) at javaposse.jobdsl.dsl.DslScriptLoader.runDslEngineForParent(DslScriptLoader.java:69) at javaposse.jobdsl.dsl.DslScriptLoader$runDslEngineForParent.call(Unknown Source) ... {noformat}

    Jenkins JIRA | 3 years ago | Daniel Spilker
    java.lang.NumberFormatException: For input string: "null"

    Root Cause Analysis

    1. java.lang.NumberFormatException

      For input string: "null"

      at java_lang_Integer$parseInt$0.call()
    2. Unknown
      java_lang_Integer$parseInt$0.call
      1. java_lang_Integer$parseInt$0.call(Unknown Source)
      1 frame
    3. javaposse.jobdsl.dsl
      GerritContext.buildSuccessful
      1. javaposse.jobdsl.dsl.helpers.triggers.GerritContext.buildSuccessful(GerritContext.groovy:46)
      1 frame
    4. Unknown
      script14113052380471783888867$_run_closure1_closure2_closure3.doCall
      1. script14113052380471783888867$_run_closure1_closure2_closure3.doCall(script14113052380471783888867.groovy:10)
      2. script14113052380471783888867$_run_closure1_closure2_closure3.doCall(script14113052380471783888867.groovy)
      2 frames
    5. javaposse.jobdsl.dsl
      TriggerContext.gerrit
      1. javaposse.jobdsl.dsl.helpers.AbstractContextHelper.executeInContext(AbstractContextHelper.groovy:21)
      2. javaposse.jobdsl.dsl.helpers.AbstractContextHelper$executeInContext$0.call(Unknown Source)
      3. javaposse.jobdsl.dsl.helpers.triggers.TriggerContext.gerrit(TriggerContext.groovy:201)
      3 frames
    6. Unknown
      script14113052380471783888867$_run_closure1_closure2.doCall
      1. script14113052380471783888867$_run_closure1_closure2.doCall(script14113052380471783888867.groovy:3)
      2. script14113052380471783888867$_run_closure1_closure2.doCall(script14113052380471783888867.groovy)
      2 frames
    7. javaposse.jobdsl.dsl
      Job.triggers
      1. javaposse.jobdsl.dsl.helpers.AbstractContextHelper.executeInContext(AbstractContextHelper.groovy:21)
      2. javaposse.jobdsl.dsl.helpers.AbstractContextHelper$executeInContext$0.callStatic(Unknown Source)
      3. javaposse.jobdsl.dsl.helpers.AbstractContextHelper.execute(AbstractContextHelper.groovy:32)
      4. javaposse.jobdsl.dsl.helpers.AbstractContextHelper$execute.callCurrent(Unknown Source)
      5. javaposse.jobdsl.dsl.helpers.triggers.TriggerContextHelper.triggers(TriggerContextHelper.groovy:21)
      6. javaposse.jobdsl.dsl.helpers.triggers.TriggerContextHelper$triggers.call(Unknown Source)
      7. javaposse.jobdsl.dsl.Job.triggers(Job.groovy)
      7 frames
    8. Unknown
      script14113052380471783888867$_run_closure1.doCall
      1. script14113052380471783888867$_run_closure1.doCall(script14113052380471783888867.groovy:2)
      1 frame
    9. javaposse.jobdsl.dsl
      DslFactory$job.callCurrent
      1. javaposse.jobdsl.dsl.JobParent.job(JobParent.groovy:32)
      2. javaposse.jobdsl.dsl.JobParent.job(JobParent.groovy)
      3. javaposse.jobdsl.dsl.DslFactory$job.callCurrent(Unknown Source)
      3 frames
    10. Unknown
      script14113052380471783888867.run
      1. script14113052380471783888867.run(script14113052380471783888867.groovy:1)
      1 frame
    11. javaposse.jobdsl.dsl
      DslScriptLoader$runDslEngineForParent.call
      1. javaposse.jobdsl.dsl.DslScriptLoader.runDslEngineForParent(DslScriptLoader.java:69)
      2. javaposse.jobdsl.dsl.DslScriptLoader$runDslEngineForParent.call(Unknown Source)
      2 frames