Repository navigation
[JENKINS-47530] java.lang.NullPointerException at end of successful build preventing downstream jobs #22375
Description
I have a Freestyle project job which has been working for over 40 runs but now gets the error below at the end of each build. I have created another job copying the configuration of this one and it runs without getting the error. This error stops the trigger of downstream jobs but doesn't appear to hurt anything in the build itself. I have not updated or installed anything recently that could account for this.
Archiving artifacts
FATAL: null
java.lang.NullPointerException
at hudson.model.RunParameterDefinition.getDefaultParameterValue(RunParameterDefinition.java:174)
at jenkins.model.ParameterizedJobMixIn.getDefaultParametersValues(ParameterizedJobMixIn.java:171)
at jenkins.model.ParameterizedJobMixIn.scheduleBuild2(ParameterizedJobMixIn.java:153)
at jenkins.model.ParameterizedJobMixIn.scheduleBuild2(ParameterizedJobMixIn.java:122)
at jenkins.model.ParameterizedJobMixIn$ParameterizedJob.scheduleBuild2(ParameterizedJobMixIn.java:417)
at hudson.model.AbstractProject.scheduleBuild2(AbstractProject.java:852)
at hudson.model.AbstractProject.scheduleBuild2(AbstractProject.java:824)
at hudson.model.AbstractProject.scheduleBuild2(AbstractProject.java:807)
at hudson.model.AbstractProject.scheduleBuild(AbstractProject.java:795)
at hudson.tasks.BuildTrigger.execute(BuildTrigger.java:278)
at hudson.model.AbstractBuild$AbstractBuildExecution.cleanUp(AbstractBuild.java:643)
at hudson.model.Build$BuildExecution.cleanUp(Build.java:201)
at hudson.model.Run.execute(Run.java:1784)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:421)
Finished: SUCCESS
Originally reported by jmckinnon, imported from: java.lang.NullPointerException at end of successful build preventing downstream jobs
- status: Resolved
- priority: Major
- component(s): core
- label(s): NullPointerException, build, jenkins, newbie-friendly
- resolution: Fixed
- resolved: 2019-02-04T13:37:37+00:00
- votes: 0
- watchers: 2
- imported: 2025-11-24
Raw content of original issue
I have a Freestyle project job which has been working for over 40 runs but now gets the error below at the end of each build. I have created another job copying the configuration of this one and it runs without getting the error. This error stops the trigger of downstream jobs but doesn't appear to hurt anything in the build itself. I have not updated or installed anything recently that could account for this.
Archiving artifacts FATAL: null java.lang.NullPointerException at hudson.model.RunParameterDefinition.getDefaultParameterValue(RunParameterDefinition.java:174) at jenkins.model.ParameterizedJobMixIn.getDefaultParametersValues(ParameterizedJobMixIn.java:171) at jenkins.model.ParameterizedJobMixIn.scheduleBuild2(ParameterizedJobMixIn.java:153) at jenkins.model.ParameterizedJobMixIn.scheduleBuild2(ParameterizedJobMixIn.java:122) at jenkins.model.ParameterizedJobMixIn$ParameterizedJob.scheduleBuild2(ParameterizedJobMixIn.java:417) at hudson.model.AbstractProject.scheduleBuild2(AbstractProject.java:852) at hudson.model.AbstractProject.scheduleBuild2(AbstractProject.java:824) at hudson.model.AbstractProject.scheduleBuild2(AbstractProject.java:807) at hudson.model.AbstractProject.scheduleBuild(AbstractProject.java:795) at hudson.tasks.BuildTrigger.execute(BuildTrigger.java:278) at hudson.model.AbstractBuild$AbstractBuildExecution.cleanUp(AbstractBuild.java:643) at hudson.model.Build$BuildExecution.cleanUp(Build.java:201) at hudson.model.Run.execute(Run.java:1784) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:421) Finished: SUCCESS
- environment:
jenkins version 2.73.2 running on Windows Server 2016
Activity
jenkins-infra-bot commentedon Oct 19, 2017
Remote link associated with this issue:
jenkins-infra-bot commentedon Oct 20, 2017
Raw content of original comment:
From what I see, it is a defect in the core. RunParameterDefinition#getProject() may return null, and this is not checked in the calling logic of getDefaultParameterValue(). Sounds it's easy to at least add proper null checks.
jenkins-infra-bot commentedon Oct 20, 2017
Raw content of original comment:
OTOH it is not a regression. The code has not been modified for years
jenkins-infra-bot commentedon Oct 20, 2017
Raw content of original comment:
The potential culprit is installation of AuthorizeProject on the instance, which may impact this default value retrieval.
jenkins-infra-bot commentedon Oct 20, 2017
jmckinnon:
Raw content of original comment:
Why would that only affect this one configuration and not the copy of it?
jenkins-infra-bot commentedon Feb 4, 2019
Raw content of original comment:
The fix was released in Jenkins 2.163