Skip to content

[JENKINS-73161] File parameters are not retained across Jenkins restarts #16437

@jenkins-infra-bot

Description

@jenkins-infra-bot

Steps to reproduce

  1. Create a freestyle job
  2. Configure it to have a file parameter
  3. Go to /job/…/build?delay=100sec (add to delay), specify a file and click Build Now
  4. Wait a few seconds to persist the queue (just in case)
  5. Restart Jenkins
  6. 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

  1. Create a freestyle job
  2. Configure it to have a file parameter
  3. Go to /job/…/build?delay=100sec (add to delay), specify a file and click Build Now
  4. Wait a few seconds to persist the queue (just in case)
  5. Restart Jenkins
  6. 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)

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions