Schema cache autoconfiguration fails for empty GeoServer data directory

Description

SchemaCache.buildAutomaticallyConfiguredUsingFileUrl fails when used on an empty GeoServer data directory because the heuristic in isSuitableDirectoryToContainCache is too strict. Only the workspaces directory is present when GeoServer is started with an empty directory (except the workspaces directory required to define the app-schema data store).

Workaround is to create an empty app-schema-cache directory in the data directory.

A warning should be logged if unable to build a cache and automaticConfigurationEnabled is true.

Environment

None

Status

Assignee

Fernando Miño

Reporter

Ben Caradoc-Davies

Triage

Components

Fix versions

Affects versions

18-beta
17.1
16.4

Priority

Medium
Configure