[Geoserver-devel] [JIRA] (GEOS-7851) Backup and Restore may fail if java.io.tmpdir is not defined

Alessio Fabiani created an issue

GeoServer / BugGEOS-7851

Backup and Restore may fail if java.io.tmpdir is not defined

Issue Type:

BugBug

Assignee:

Alessio Fabiani

Components:

Backup and Restore, Community modules

Created:

14/Nov/16 12:25 PM

Priority:

MediumMedium

Reporter:

Alessio Fabiani

BackupUtils class needs to store temporary files in a temp folder. In order to do this it is now trying to do

Resource root = Resources.fromPath(System.getProperty(“java.io.tmpdir”, “.”));

This causes an exception if the property “java.io.tmpdir” is null falling back to “.”

java.lang.IllegalArgumentException: Contains invalid . path:
at org.geoserver.platform.resource.Paths.toPath(Paths.java:168)
at org.geoserver.platform.resource.Paths.path(Paths.java:114)
at org.geoserver.platform.resource.Paths.path(Paths.java:96)
at org.geoserver.platform.resource.FileSystemResourceStore$FileSystemResource.get(FileSystemResourceStore.java:422)

The proposed solution would be to make use of the GeoServer data dir temp folder if the System variable is not available.

GeoServer will WARNING the user about this since the GEOSERVER Data Dir temp folder may considerably increase in size.

Add Comment

Add Comment

This message was sent by Atlassian JIRA (v1000.526.2#100018-sha1:d415428)

Atlassian logo