[Geoserver-devel] [JIRA] (GEOS-8684) PUT to datasources with method option as `external` not working has expected

Abel Soares created an issue

GeoServer / BugGEOS-8684

PUT to datasources with method option as external not working has expected

Issue Type:

BugBug

Affects Versions:

2.13.0

Assignee:

Unassigned

Components:

REST

Created:

14/Apr/18 4:47 PM

Environment:

mac os, running Geoserver 2.13 compiled from source.

Priority:

MediumMedium

Reporter:

Abel Soares

Following the REST API documentation [here][1] i should be able to do a PUT request to `/workspaces/

{workspaceName}

/datastores/

{storeName}

/

{method}

.

{format}

. Problem is i cannot get how to do it with an external` method option.

This is with i’m doing:
I already have a .zip file with shapefiles in the geoserver data directory and i do the following PUT:
/workspaces/MyWorkspace/datastores/StoreName/external.shp

The file absolute path is in the body and the myWorkspace already exists.

Geoserver logs:

org.geoserver.rest.RestException 500 INTERNAL_SERVER_ERROR: Error while storing uploaded file:
...
Caused by: java.net.MalformedURLException: no protocol: "/Users/Projects/geoserver/data/release/myData/shapefile.zip"

It really seems to me that Geoserver is trying to process the file path as an url but that should only happen if method was url.

Also, i’m able to do this request with success if method is file and the body has the file binary.

Add Comment

Add Comment

Get Jira notifications on your phone! Download the Jira Cloud app for Android or iOS


This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100082-sha1:f003f73)

Atlassian logo