Jenkins JIRA | fbartz | 5 months ago
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    - create a pipeline Job with dynamic gerrit triggers - open "Configure" again and save again (important) - restart Jenkins - you'll get a NPE loading the job: WARNING: Frank-pipeline-test-trigger java.lang.NullPointerException at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger.cancelTimer( at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger.stop( at at org.jenkinsci.plugins.workflow.job.WorkflowJob.onLoad( at hudson.model.Items.load( at jenkins.model.Jenkins$ at org.jvnet.hudson.reactor.TaskGraphBuilder$ at org.jvnet.hudson.reactor.Reactor.runTask( at jenkins.model.Jenkins$7.runTask( at org.jvnet.hudson.reactor.Reactor$ at org.jvnet.hudson.reactor.Reactor$ at java.util.concurrent.ThreadPoolExecutor.runWorker( at java.util.concurrent.ThreadPoolExecutor$ at the problem is the <gerritTriggerTimerTask> node in the job's config.xml: - When you freshly create the pipeline job (including dynamic trigger settings), the xml-node is not there and the job is loading correctly, even when restarting jenkins - as soon as you re-save the job config, the <gerritTriggerTimerTask> node is inserted in the job's xml and now on the next Jenkins restart the job fails to load with an NPE as stated above - if you don't restart the jenkins, the job keeps working and is still editable, also dynamic triggers work, but as soon as you restart jenkins, the job is no longer accessible - if you manually remove the <gerritTriggerTimerTask> node in the job's config.xml in the jenkins backend and restart jenkins, the job becomes available again (until the next save + restart)

    Jenkins JIRA | 5 months ago | fbartz

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger.cancelTimer()
    2. com.sonyericsson.hudson
      1. com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger.cancelTimer(
      2. com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger.stop(
      2 frames
    3. org.jenkinsci.plugins
      2. org.jenkinsci.plugins.workflow.job.WorkflowJob.onLoad(
      2 frames
    4. Hudson
      1. hudson.model.Items.load(
      1 frame
    5. jenkins.model
      1. jenkins.model.Jenkins$
      1 frame
    6. init
      1. org.jvnet.hudson.reactor.TaskGraphBuilder$
      2. org.jvnet.hudson.reactor.Reactor.runTask(
      2 frames
    7. jenkins.model
      1. jenkins.model.Jenkins$7.runTask(
      1 frame
    8. init
      1. org.jvnet.hudson.reactor.Reactor$
      2. org.jvnet.hudson.reactor.Reactor$
      2 frames
    9. Java RT
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(
      2. java.util.concurrent.ThreadPoolExecutor$
      3 frames