[Geoserver-devel] [jira] (GEOS-5869) Upload H2 database with REST API doesn't work

Jose Garcia created BugGEOS-5869
Upload H2 database with REST API doesn’t work

Issue Type:

BugBug

Affects Versions:

2.3.3

Assignee:

Andrea Aime

Components:

REST

Created:

28/Jun/13 1:58 AM

Description:

Tried to upload a H2 database to an existing PostGIS datastore using the REST API.

$ curl -u admin:XXXXXX -v -XPUT -H "Content-type: h2" --data-binary @myfirstjaspadb.h2 [http://localhost:8080/geoserver/rest/workspaces/postgis/datastores/postgis/file.h2](http://localhost:8080/geoserver/rest/workspaces/postgis/datastores/postgis/file.h2)

The data is not loaded in postgis database and no layer is created in GeoServer. Tried also for Content-type: application/h2, as documentation is no clear about the exact value to provide, but same result.

Justin confirmed that seem there’s bug in the h2 file upload:

> The way the upload works is it relies on the zip file containing a file that matches the extension, in this case h2. But an h2 database has no file with such an extension. I tried a hack of changing the .data.db file to .h2 but it didn’t work either.

Project:

GeoServer

Priority:

MajorMajor

Reporter:

Jose Garcia

This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: [http://www.atlassian.com/software/jira](http://www.atlassian.com/software/jira)