java.lang.NullPointerException

Jenkins JIRA | Craig Ringer | 2 years ago
  1. 0

    On several occasions recently, while editing my matrix jobs, I've noticed that Jenkins has lost the SCM configuration for git polling and replaced it with an invalid entry in the job xml: {code} <triggers> <null/> </triggers> {code} that causes the job to fail to load when Jenkins is restarted, with: {code} Failed Loading job bdr_linux java.lang.NullPointerException at hudson.model.AbstractProject.onLoad(AbstractProject.java:326) at hudson.matrix.MatrixProject.onLoad(MatrixProject.java:496) at hudson.model.Items.load(Items.java:279) at jenkins.model.Jenkins$18.run(Jenkins.java:2599) 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:885) 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:1146) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:701) {code} I haven't yet nailed down a way to reproduce this, but it seems to occur most often around when I've also been having issues with configuration elements throwing exceptions on save. The job appears to just "vanish" from the job list, as Jenkins doesn't show broken jobs in the UI at all. To find out what happened I had to go digging in the config XML. I version my configuration XML, so I was able to see the following in the most recent diff for jobs/bdr_linux/config.xml: {code} <triggers> - <hudson.triggers.SCMTrigger> - <spec>H/5 * * * *</spec> - <ignorePostCommitHooks>false</ignorePostCommitHooks> - </hudson.triggers.SCMTrigger> + <null/> </triggers> {code} To repair the job, I can revert that hunk, or just delete the invalid null element then re-create the trigger in the UI. So there are a couple of problems here: - A null element like that is invalid and should never be written out, as it cannot be consumed; and - the trigger configuration is being lost.

    Jenkins JIRA | 2 years ago | Craig Ringer
    java.lang.NullPointerException
  2. 0

    On several occasions recently, while editing my matrix jobs, I've noticed that Jenkins has lost the SCM configuration for git polling and replaced it with an invalid entry in the job xml: {code} <triggers> <null/> </triggers> {code} that causes the job to fail to load when Jenkins is restarted, with: {code} Failed Loading job bdr_linux java.lang.NullPointerException at hudson.model.AbstractProject.onLoad(AbstractProject.java:326) at hudson.matrix.MatrixProject.onLoad(MatrixProject.java:496) at hudson.model.Items.load(Items.java:279) at jenkins.model.Jenkins$18.run(Jenkins.java:2599) 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:885) 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:1146) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:701) {code} I haven't yet nailed down a way to reproduce this, but it seems to occur most often around when I've also been having issues with configuration elements throwing exceptions on save. The job appears to just "vanish" from the job list, as Jenkins doesn't show broken jobs in the UI at all. To find out what happened I had to go digging in the config XML. I version my configuration XML, so I was able to see the following in the most recent diff for jobs/bdr_linux/config.xml: {code} <triggers> - <hudson.triggers.SCMTrigger> - <spec>H/5 * * * *</spec> - <ignorePostCommitHooks>false</ignorePostCommitHooks> - </hudson.triggers.SCMTrigger> + <null/> </triggers> {code} To repair the job, I can revert that hunk, or just delete the invalid null element then re-create the trigger in the UI. So there are a couple of problems here: - A null element like that is invalid and should never be written out, as it cannot be consumed; and - the trigger configuration is being lost.

    Jenkins JIRA | 2 years ago | Craig Ringer
    java.lang.NullPointerException
  3. 0

    Upgrading to v1.473 has broken all my matrix jobs

    Google Groups | 4 years ago | Thomas Fields
    java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    NPE in Matrix job

    Google Groups | 4 years ago | Andrew Melo
    java.lang.NullPointerException
  6. 0

    Update to 1.473 breaks matrix jobs

    Google Groups | 4 years ago | wohauser
    java.lang.NullPointerException

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

      No message provided

      at hudson.model.AbstractProject.onLoad()
    2. Hudson
      Items.load
      1. hudson.model.AbstractProject.onLoad(AbstractProject.java:326)
      2. hudson.matrix.MatrixProject.onLoad(MatrixProject.java:496)
      3. hudson.model.Items.load(Items.java:279)
      3 frames
    3. jenkins.model
      Jenkins$18.run
      1. jenkins.model.Jenkins$18.run(Jenkins.java:2599)
      1 frame
    4. init
      Reactor.runTask
      1. org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
      2. org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
      2 frames
    5. jenkins.model
      Jenkins$7.runTask
      1. jenkins.model.Jenkins$7.runTask(Jenkins.java:885)
      1 frame
    6. init
      Reactor$Node.run
      1. org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
      2. org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
      2 frames
    7. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      3. java.lang.Thread.run(Thread.java:701)
      3 frames