java.lang.NullPointerException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • After upgrading to latest 1.501 (from 1.484) I see this error a lot in my Jenkins log surging from several actions: scm polling, columns sort, dashboard views, etc. {code} Feb 16, 2013 6:00:55 PM hudson.triggers.SCMTrigger$Runner runPolling SEVERE: Failed to record SCM polling for hudson.model.FreeStyleProject@4dcc1f71[PM_OSS5_ACOMHFE_ADAPTATION_LV1] java.lang.NullPointerException at hudson.model.AbstractBuild.getPreviousBuild(AbstractBuild.java:213) at hudson.tasks.Fingerprinter$FingerprintAction.onLoad(Fingerprinter.java:349) at hudson.model.Run.onLoad(Run.java:320) at hudson.model.RunMap.retrieve(RunMap.java:226) at hudson.model.RunMap.retrieve(RunMap.java:59) at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:645) at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:608) at jenkins.model.lazy.AbstractLazyLoadRunMap.search(AbstractLazyLoadRunMap.java:347) at jenkins.model.lazy.AbstractLazyLoadRunMap.getByNumber(AbstractLazyLoadRunMap.java:505) at jenkins.model.lazy.AbstractLazyLoadRunMap.search(AbstractLazyLoadRunMap.java:358) at jenkins.model.lazy.AbstractLazyLoadRunMap.newestBuild(AbstractLazyLoadRunMap.java:300) at hudson.model.AbstractProject.getLastBuild(AbstractProject.java:1021) at hudson.model.AbstractProject.poll(AbstractProject.java:1387) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:439) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:468) at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) {code} I've disabled Downstream+buildview+plugin because of this error some jobs wouldn't even load, while other plugins like DashboardView would get dogslow while still throwing this same stacktrace, but still the same stack trace keeps showing up even in the most basic things like SCM Polling. Please check.
    via by Jose Sa,
  • After upgrading to latest 1.501 (from 1.484) I see this error a lot in my Jenkins log surging from several actions: scm polling, columns sort, dashboard views, etc. {code} Feb 16, 2013 6:00:55 PM hudson.triggers.SCMTrigger$Runner runPolling SEVERE: Failed to record SCM polling for hudson.model.FreeStyleProject@4dcc1f71[PM_OSS5_ACOMHFE_ADAPTATION_LV1] java.lang.NullPointerException at hudson.model.AbstractBuild.getPreviousBuild(AbstractBuild.java:213) at hudson.tasks.Fingerprinter$FingerprintAction.onLoad(Fingerprinter.java:349) at hudson.model.Run.onLoad(Run.java:320) at hudson.model.RunMap.retrieve(RunMap.java:226) at hudson.model.RunMap.retrieve(RunMap.java:59) at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:645) at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:608) at jenkins.model.lazy.AbstractLazyLoadRunMap.search(AbstractLazyLoadRunMap.java:347) at jenkins.model.lazy.AbstractLazyLoadRunMap.getByNumber(AbstractLazyLoadRunMap.java:505) at jenkins.model.lazy.AbstractLazyLoadRunMap.search(AbstractLazyLoadRunMap.java:358) at jenkins.model.lazy.AbstractLazyLoadRunMap.newestBuild(AbstractLazyLoadRunMap.java:300) at hudson.model.AbstractProject.getLastBuild(AbstractProject.java:1021) at hudson.model.AbstractProject.poll(AbstractProject.java:1387) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:439) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:468) at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) {code} I've disabled Downstream+buildview+plugin because of this error some jobs wouldn't even load, while other plugins like DashboardView would get dogslow while still throwing this same stacktrace, but still the same stack trace keeps showing up even in the most basic things like SCM Polling. Please check.
    via by Jose Sa,
  • PTC Integrity Plugin - Jenkins - Jenkins Wiki
    via by Unknown author,
  • PTC Integrity Plugin - Jenkins - Jenkins Wiki
    via by Unknown author,
  • Job disappears after completion
    via by eric...@rocketmail.com,
  • The problem is that all executors on all nodes die with this stack trace: java.lang.NullPointerException at hudson.tasks.Fingerprinter$FingerprintAction.onLoad(Fingerprinter.java:346) at hudson.model.Run.onLoad(Run.java:319) at hudson.model.RunMap.retrieve(RunMap.java:226) at hudson.model.RunMap.retrieve(RunMap.java:59) at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:667) at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:629) at jenkins.model.lazy.AbstractLazyLoadRunMap.search(AbstractLazyLoadRunMap.java:368) at hudson.model.AbstractBuild.getPreviousBuild(AbstractBuild.java:220) at hudson.model.AbstractBuild.getPreviousBuild(AbstractBuild.java:103) at hudson.model.Job.getLastBuildsOverThreshold(Job.java:887) at hudson.model.Job.getEstimatedDuration(Job.java:894) at hudson.model.queue.MappingWorksheet.<init>(MappingWorksheet.java:320) at hudson.model.queue.MappingWorksheet.<init>(MappingWorksheet.java:303) at hudson.model.Queue.maintain(Queue.java:1035) at hudson.model.Queue.pop(Queue.java:863) at hudson.model.Executor.grabJob(Executor.java:285) at hudson.model.Executor.run(Executor.java:206) A simple restart of the executor is not working, restart of Jenkins do not help either. Instead the whole Tomcat server needs to be restarted. In the FingerprintAction where the NPE originates you can see these lines: 345: public void onLoad() { 346: if (build.getParent() == null) { 347: logger.warning("JENKINS-16845: broken FingerprintAction record"); 348: build = null; 349: return; 250: } When looking in the Tomcat logs: > grep JENKINS-16845 /path/to/catalina.out WARNING: JENKINS-16845: broken FingerprintAction record WARNING: JENKINS-16845: broken FingerprintAction record . . . So a possible reason is that onLoad has been called twice. I do not know if it has any relevance to this bug, but just before all executors died we had started a build of a particular job. The build could never start because there were no available executors. After Tomcat had been restarted we saw the job that had lost all Build History. The history was still there on the disc, but could not be seen on the job page. It is unclear if the history was gone before the restart. We had learned that a trick to get back the history is to rename the job and then rename again to the original name. After that we tried to build again and this time it worked.
    via by Jan Fagerström,
  • The problem is that all executors on all nodes die with this stack trace: java.lang.NullPointerException at hudson.tasks.Fingerprinter$FingerprintAction.onLoad(Fingerprinter.java:346) at hudson.model.Run.onLoad(Run.java:319) at hudson.model.RunMap.retrieve(RunMap.java:226) at hudson.model.RunMap.retrieve(RunMap.java:59) at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:667) at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:629) at jenkins.model.lazy.AbstractLazyLoadRunMap.search(AbstractLazyLoadRunMap.java:368) at hudson.model.AbstractBuild.getPreviousBuild(AbstractBuild.java:220) at hudson.model.AbstractBuild.getPreviousBuild(AbstractBuild.java:103) at hudson.model.Job.getLastBuildsOverThreshold(Job.java:887) at hudson.model.Job.getEstimatedDuration(Job.java:894) at hudson.model.queue.MappingWorksheet.<init>(MappingWorksheet.java:320) at hudson.model.queue.MappingWorksheet.<init>(MappingWorksheet.java:303) at hudson.model.Queue.maintain(Queue.java:1035) at hudson.model.Queue.pop(Queue.java:863) at hudson.model.Executor.grabJob(Executor.java:285) at hudson.model.Executor.run(Executor.java:206) A simple restart of the executor is not working, restart of Jenkins do not help either. Instead the whole Tomcat server needs to be restarted. In the FingerprintAction where the NPE originates you can see these lines: 345: public void onLoad() { 346: if (build.getParent() == null) { 347: logger.warning("JENKINS-16845: broken FingerprintAction record"); 348: build = null; 349: return; 250: } When looking in the Tomcat logs: > grep JENKINS-16845 /path/to/catalina.out WARNING: JENKINS-16845: broken FingerprintAction record WARNING: JENKINS-16845: broken FingerprintAction record . . . So a possible reason is that onLoad has been called twice. I do not know if it has any relevance to this bug, but just before all executors died we had started a build of a particular job. The build could never start because there were no available executors. After Tomcat had been restarted we saw the job that had lost all Build History. The history was still there on the disc, but could not be seen on the job page. It is unclear if the history was gone before the restart. We had learned that a trick to get back the history is to rename the job and then rename again to the original name. After that we tried to build again and this time it worked.
    via by Jan Fagerström,
    • java.lang.NullPointerException at hudson.model.AbstractBuild.getPreviousBuild(AbstractBuild.java:213) at hudson.tasks.Fingerprinter$FingerprintAction.onLoad(Fingerprinter.java:349) at hudson.model.Run.onLoad(Run.java:320) at hudson.model.RunMap.retrieve(RunMap.java:226) at hudson.model.RunMap.retrieve(RunMap.java:59) at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:645) at jenkins.model.lazy.AbstractLazyLoadRunMap.load(AbstractLazyLoadRunMap.java:608) at jenkins.model.lazy.AbstractLazyLoadRunMap.search(AbstractLazyLoadRunMap.java:347) at jenkins.model.lazy.AbstractLazyLoadRunMap.getByNumber(AbstractLazyLoadRunMap.java:505) at jenkins.model.lazy.AbstractLazyLoadRunMap.search(AbstractLazyLoadRunMap.java:358) at jenkins.model.lazy.AbstractLazyLoadRunMap.newestBuild(AbstractLazyLoadRunMap.java:300) at hudson.model.AbstractProject.getLastBuild(AbstractProject.java:1021) at hudson.model.AbstractProject.poll(AbstractProject.java:1387) at hudson.triggers.SCMTrigger$Runner.runPolling(SCMTrigger.java:439) at hudson.triggers.SCMTrigger$Runner.run(SCMTrigger.java:468) at hudson.util.SequentialExecutionQueue$QueueEntry.run(SequentialExecutionQueue.java:118) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722)

    Users with the same issue

    davidvanlaatumdavidvanlaatum
    3 times, last one,