Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-38542

NullPointerException loading Pipeline Job with dynamic gerrit triggers

    Details

    • Similar Issues:

      Description

      • 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(GerritTrigger.java:553)
      at com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.GerritTrigger.stop(GerritTrigger.java:629)
      at org.jenkinsci.plugins.workflow.job.properties.PipelineTriggersJobProperty.stopTriggers(PipelineTriggersJobProperty.java:93)
      at org.jenkinsci.plugins.workflow.job.WorkflowJob.onLoad(WorkflowJob.java:149)
      at hudson.model.Items.load(Items.java:333)
      at jenkins.model.Jenkins$17.run(Jenkins.java:2823)
      at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
      at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
      at jenkins.model.Jenkins$7.runTask(Jenkins.java:998)
      at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
      at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)

      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)

        Attachments

          Activity

          frank_bartz fbartz created issue -
          abayer Andrew Bayer made changes -
          Field Original Value New Value
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]

            People

            • Assignee:
              rsandell rsandell
              Reporter:
              frank_bartz fbartz
            • Votes:
              4 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: