-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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)