Importer doesn't pass spring request context to jobs threads

Description

This error happens with geofence-server installed (but is not specific to geofence) and can be reproduced performing the following steps:

1 - Create an importer task:

2 - Upload the data (I zipped nyc shapefiles provided with GeoServer):

3 - Start the import task asynchronously:

We should get this exception:

This error happens because the importer is not sharing the current request context when running a job asynchronously:

https://github.com/geoserver/geoserver/blob/master/src/extension/importer/core/src/main/java/org/geoserver/importer/Importer.java#L874-L890

Environment

None

Status

Assignee

Nuno Oliveira

Reporter

Nuno Oliveira

Triage

None

Fix versions

Affects versions

None

Components

Priority

Medium
Configure