Uploaded image for project: 'GeoServer'
  1. GEOS-5869

Upload H2 database with REST API doesn't work

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 2.3.3
    • Fix Version/s: 2.10.4, 2.11.0, 2.12-beta
    • Component/s: None
    • Labels:
      None

      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:

      <blockquote>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.</blockquote>

        Attachments

          Activity

            People

            • Assignee:
              nmco Nuno Oliveira
              Reporter:
              harrison.grundy codehaus (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: