Integrated geofence odd path for db under Windows

Description

The db gets created, but look where:

C:\devel\geoserver\src\web\app\develgeoserversrcwebappsrcmainwebappdata\geofence\geofence_db

I'm pretty sure the "develgeoserversrcwebappsrcmainwebappdata" directory was not meant to be there

Environment

None

Activity

Show:
Nuno Oliveira
May 21, 2016, 8:52 PM

Hi Andrea,
I have manually test the above pull requests on windows and they fixed this issue (in Linux is working too) GeoFence DB uses the correct path.

Nuno Oliveira
May 8, 2016, 9:07 PM
Edited

I completely agree with Andrea on this:
"I cannot stress enough how this is a bad practice, nowhere in GeoServer we have configuration stuck in the application context files, they should only contain what's truly static..."

That say, here are the links to the pull requests (including backport to 2.9.x) that fix this issue:

Andrea Aime
October 16, 2015, 1:37 PM

See https://github.com/geoserver/geoserver/commit/55ab5a568bd448fe9ae8f4ea5bc9cf413ceb7626
But unfortunately it does not really work on Windows, must be revisited

Andrea Aime
October 16, 2015, 10:10 AM

I believe this is happening because the data dir value is just blindly expanded in the application context:
https://github.com/geoserver/geoserver/blob/master/src/community/geofence-server/src/main/resources/applicationContext.xml#L59

I cannot stress enough how this is a bad practice, nowhere in GeoServer we have configuration stuck in the application context files, they should only contain what's truly static...

Fixed

Assignee

Nuno Oliveira

Reporter

Andrea Aime

Fix versions