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.

  • 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.
    via by Craig Ringer,
  • 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.
    via by Craig Ringer,
  • NPE in Matrix job
    via by Andrew Melo,
  • Update to 1.473 breaks matrix jobs
    via by wohauser,
  • Old projects, who don't have a <publishers> tag in their config.xml will crash while loading on statup: {noformat} ←[0m←[31mFeb 01, 2012 7:12:36 PM jenkins.InitReactorRunner$1 onTaskFailed Schwerwiegend: Failed Loading job MyProjectName java.lang.NullPointerException at hudson.model.Project.createTransientActions(Project.java:207) at hudson.model.AbstractProject.updateTransientActions(AbstractProject.java:602) at hudson.model.AbstractProject.onLoad(AbstractProject.java:272) at hudson.model.Project.onLoad(Project.java:88) at hudson.model.Items.load(Items.java:115) at jenkins.model.Jenkins$14.run(Jenkins.java:2372) at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:146) at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259) at jenkins.model.Jenkins$5.runTask(Jenkins.java:812) at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187) at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) {noformat} I'm currently using v1.450, but at least v1.449 is affected too. I'm not sure which upgrade step has introduced this problem, because I only lost some old minor important projects and I havn't noticed it immediately. It seems that the affected config.xml are touched the last time at 2011-12-08. So I thing it was v1.442, which made it.
    via by Daniel Rohlfing,
  • After upgrading from 1.504 to 1.507, all our Matrix jobs are failing to load with this message and NullPointerException: SEVERE: Failed Loading job BPS 2.4-branch VC++ Matrix java.lang.NullPointerException at hudson.matrix.MatrixProject.getItem(MatrixProject.java:669) at hudson.matrix.MatrixProject.getItem(MatrixProject.java:662) at hudson.matrix.MatrixProject.getItem(MatrixProject.java:98) at hudson.model.AbstractProject.onLoad(AbstractProject.java:291) at hudson.model.Project.onLoad(Project.java:83) at hudson.matrix.MatrixConfiguration.onLoad(MatrixConfiguration.java:89) at hudson.matrix.MatrixProject.loadConfigurations(MatrixProject.java:541) at hudson.matrix.MatrixProject.loadConfigurations(MatrixProject.java:548) at hudson.matrix.MatrixProject.loadConfigurations(MatrixProject.java:548) at hudson.matrix.MatrixProject.rebuildConfigurations(MatrixProject.java:585) at hudson.matrix.MatrixProject.onLoad(MatrixProject.java:476) at hudson.model.Items.load(Items.java:221) at jenkins.model.Jenkins$17.run(Jenkins.java:2552) at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:146) at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259) at jenkins.model.Jenkins$7.runTask(Jenkins.java:887) at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187) at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) 25-03-2013 08:38:06 jenkins.InitReactorRunner$1 onTaskFailed Configuration file attached.
    via by Lars Christensen,
  • Hi, after installation of version 1.613 Jenkins fails to load a project with the following output: {code} May 15, 2015 9:54:45 AM jenkins.InitReactorRunner$1 onTaskFailed SEVERE: Failed Loading job web-piraten java.lang.NullPointerException at hudson.matrix.MatrixProject.createTransientActions(MatrixProject.java:446) at hudson.model.AbstractProject.updateTransientActions(AbstractProject.java:748) at hudson.matrix.MatrixProject.updateTransientActions(MatrixProject.java:456) at hudson.model.AbstractProject.onLoad(AbstractProject.java:333) at hudson.matrix.MatrixProject.onLoad(MatrixProject.java:497) at hudson.model.Items.load(Items.java:322) at jenkins.model.Jenkins$17.run(Jenkins.java:2655) 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:905) 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:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) {code} I tried a manual downgrade to Jenkins 1.612, where no exception was thrown, but the job couldn't be accessed either!? The jobs' config.xml is the following: {code} <?xml version='1.0' encoding='UTF-8'?> <matrix-project plugin="matrix-project@1.3"> <actions/> <description>Automatisches Deployment der Web-Piraten</description> <keepDependencies>false</keepDependencies> <properties/> <scm class="hudson.plugins.git.GitSCM" plugin="git@2.0"> <configVersion>2</configVersion> <userRemoteConfigs> <hudson.plugins.git.UserRemoteConfig> <url>ssh://git@server.com/repo.git</url> </hudson.plugins.git.UserRemoteConfig> </userRemoteConfigs> <branches> <hudson.plugins.git.BranchSpec> <name>master</name> </hudson.plugins.git.BranchSpec> </branches> <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations> <submoduleCfg class="list"/> <extensions/> </scm> <canRoam>true</canRoam> <disabled>true</disabled> <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding> <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding> <triggers> <hudson.triggers.SCMTrigger> <spec># every 5 minutes H/5 * * * *</spec> <ignorePostCommitHooks>false</ignorePostCommitHooks> </hudson.triggers.SCMTrigger> </triggers> <concurrentBuild>false</concurrentBuild> <axes/> <builders> <hudson.tasks.Shell> <command>bundle install cap production deploy</command> </hudson.tasks.Shell> </builders> <publishers> <hudson.tasks.Mailer plugin="mailer@1.5"> <recipients>alice@mail.com bob@mail.com</recipients> <dontNotifyEveryUnstableBuild>true</dontNotifyEveryUnstableBuild> <sendToIndividuals>false</sendToIndividuals> </hudson.tasks.Mailer> </publishers> </matrix-project> {code} Please do not hesitate to ask for additional information if you need some.
    via by Björn Peemöller,
  • Old projects, who don't have a <publishers> tag in their config.xml will crash while loading on statup: {noformat} ←[0m←[31mFeb 01, 2012 7:12:36 PM jenkins.InitReactorRunner$1 onTaskFailed Schwerwiegend: Failed Loading job MyProjectName java.lang.NullPointerException at hudson.model.Project.createTransientActions(Project.java:207) at hudson.model.AbstractProject.updateTransientActions(AbstractProject.java:602) at hudson.model.AbstractProject.onLoad(AbstractProject.java:272) at hudson.model.Project.onLoad(Project.java:88) at hudson.model.Items.load(Items.java:115) at jenkins.model.Jenkins$14.run(Jenkins.java:2372) at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:146) at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259) at jenkins.model.Jenkins$5.runTask(Jenkins.java:812) at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187) at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) {noformat} I'm currently using v1.450, but at least v1.449 is affected too. I'm not sure which upgrade step has introduced this problem, because I only lost some old minor important projects and I havn't noticed it immediately. It seems that the affected config.xml are touched the last time at 2011-12-08. So I thing it was v1.442, which made it.
    via by Daniel Rohlfing,
    • 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)
    No Bugmate found.