1

I'm using a put request to create a datastore under a workspace, and automatically register the included feature type in a new layer.

The put request succeeds, and I can see the datastore points to a real location on the filesystem, but the datastore contains no features (even though it clearly does when imported into ArgGIS).

Has anyone run into this issue before?

tl;dr

$this->guzzleClient->request('PUT', 'workspaces/' . $preparedTypeTitleStr . '/datastores/' . $preparedResourceTitleStr . '/file.shp?configure=all&update=overwrite', [
    'headers' => ['Content-Type' => 'application/zip'],
    'body' => $shapefile_zip_body,
    'timeout' => 0
]);

This succeeds and the datastore is created and points to:

file:/opt/tomcat/webapps/ROOT/data/data/Map_resource_vector_based_Map_Layer/blablablablabla/

However a call to:

$workSpaceLayers = json_decode($this->guzzleClient->request('GET', 'workspaces/' . $preparedTypeTitleStr . '/datastores/' . $preparedResourceTitleStr . '/featuretypes.json', ['headers' => ['Accept' => 'application/json']])->getBody()->getContents());

returns an empty array for feature types.

I've done this before and the feature type(s) are registered automatically and made available as layers (which I can ultimately wrap into a layer group with some included styling information).

Can anyone tell me what's going wrong? Theres no errors being generated, the datastore is simply empty.

closed as off-topic by Ian Turton Jul 7 at 9:44

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This problem cannot or can no longer be reproduced. Changes to the system or to the asker's circumstances may have rendered the question obsolete, or the question does not include a procedure to enable potential answerers to reproduce the same symptoms. Such questions are off-topic as they are unlikely to help future readers, but editing them to include more details can lead to re-opening." – Ian Turton
If this question can be reworded to fit the rules in the help center, please edit the question.

  • turn logging up to developer and see what is in the log file. – Ian Turton Jul 5 at 7:44
  • Thanks fro the suggestion Ian, unfortunately this didn't help as it wasn't an error generating issue. I figured out eventually I could get round it by importing and then exporting the shapefiles into mapshaper (which is an online service), they would then work correctly on Geoserver. Still unsure exactly why. – Aaron Cole Jul 7 at 5:19