Repository navigation
Closed
Description
Steps to reproduce
- Create a freestyle job
- Configure it to have a file parameter
- Go to /job/…/build?delay=100sec (add to delay), specify a file and click Build Now
- Wait a few seconds to persist the queue (just in case)
- Restart Jenkins
- Wait until the build is started
Expected results
The build starts and successfully picks up the file parameter, behaving as if there was no restart while the build was queued
Actual results
The build fails with:
Running as SYSTEM
Building in workspace /var/jenkins_home/workspace/fs
FATAL: Cannot invoke "org.apache.commons.fileupload.FileItem.getName()" because "this.this$0.file" is null
java.lang.NullPointerException: Cannot invoke "org.apache.commons.fileupload.FileItem.getName()" because "this.this$0.file" is null
at hudson.model.FileParameterValue$1.setUp(FileParameterValue.java:159)
at hudson.model.Build$BuildExecution.doRun(Build.java:158)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:526)
at hudson.model.Run.execute(Run.java:1894)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)
at hudson.model.ResourceController.execute(ResourceController.java:101)
at hudson.model.Executor.run(Executor.java:442)
Finished: FAILURE
Notes
May be a regression in 1.494 due to 4dde24e according to #9260 (comment)
Originally reported by
danielbeck, imported from: File parameters are not retained across Jenkins restarts
- assignee: mawinter69
- status: Closed
- priority: Minor
- component(s): core
- resolution: Fixed
- resolved: 2025-09-30T21:28:07+00:00
- votes: 0
- watchers: 3
- imported: 2025-11-24
Raw content of original issue
Steps to reproduce
- Create a freestyle job
- Configure it to have a file parameter
- Go to /job/…/build?delay=100sec (add to delay), specify a file and click Build Now
- Wait a few seconds to persist the queue (just in case)
- Restart Jenkins
- Wait until the build is started
Expected results
The build starts and successfully picks up the file parameter, behaving as if there was no restart while the build was queued
Actual results
The build fails with:
Running as SYSTEM Building in workspace /var/jenkins_home/workspace/fs FATAL: Cannot invoke "org.apache.commons.fileupload.FileItem.getName()" because "this.this$0.file" is null java.lang.NullPointerException: Cannot invoke "org.apache.commons.fileupload.FileItem.getName()" because "this.this$0.file" is null at hudson.model.FileParameterValue$1.setUp(FileParameterValue.java:159) at hudson.model.Build$BuildExecution.doRun(Build.java:158) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:526) at hudson.model.Run.execute(Run.java:1894) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44) at hudson.model.ResourceController.execute(ResourceController.java:101) at hudson.model.Executor.run(Executor.java:442) Finished: FAILURENotes
May be a regression in 1.494 due to 4dde24e according to #9260 (comment)
Activity
jenkins-infra-bot commentedon May 13, 2024
Remote link associated with this issue:
jenkins-infra-bot commentedon May 13, 2024
Raw content of original comment:
Compare jenkinsci/file-parameters-plugin#190
jenkins-infra-bot commentedon Sep 14, 2025
mawinter69:
Raw content of original comment:
Just noting that a stashedFile parameter from file-parameter plugin also doesn't survive a Jenkins restart while it is in the queue
jenkins-infra-bot commentedon Sep 15, 2025
Raw content of original comment:
mawinter69 better report that in the plugin (currently there is a test for the Base64 version of this scenario only).