Hi guys,
I have used the geoserver REST API to Create Workspace/Namespace ->> the
Create datastore (Postgis) and now trying to publish a layer via REST still.
I get this error when I try to publish the Postgis datastore tables.
Note: the layer name is appended at the end of the Namespace URI. Why would
that be so? Example XML tat I'm posting to the REST endpoint for
featureTypes is this
endpoint:
http://geoserverhost:8180/geoserver/rest/workspaces/[workspace]/datastores/[datastore]/featuretypes
<featureType>
<name>rivers</name>
<nativeName>rivers</nativeName>
<title> rivers </title>
<srs>EPSG:4326</srs>
<enabled>true</enabled>
<namespace>
<name>[workspaceName]</name>
</namespace>
<namespaceName>[namespaccePrefix]</namespaceName>
</featureType>
Here is the Geoserver Stack trace
2018-07-03 11:57:49,919 ERROR [geoserver.rest] - Schema '
http://www.host.co.ke/[prefix]:rivers' does not exist.
java.io.IOException: Schema 'http://www.ramani.co.ke/egis:rivers' does not
exist.
at
org.geotools.data.store.ContentDataStore.ensureEntry(ContentDataStore.java:620)
at
org.geotools.data.store.ContentDataStore.getFeatureSource(ContentDataStore.java:393)
at
org.geotools.data.store.ContentDataStore.getFeatureSource(ContentDataStore.java:686)
at
org.geoserver.catalog.ResourcePool.getFeatureSource(ResourcePool.java:1267)
at
org.geoserver.catalog.impl.FeatureTypeInfoImpl.getFeatureSource(FeatureTypeInfoImpl.java:126)
at
org.geoserver.catalog.CatalogBuilder.getNativeBounds(CatalogBuilder.java:608)
at
org.geoserver.catalog.CatalogBuilder.doSetupBounds(CatalogBuilder.java:508)
at
org.geoserver.catalog.CatalogBuilder.setupBounds(CatalogBuilder.java:497)
at
org.geoserver.catalog.CatalogBuilder.initFeatureType(CatalogBuilder.java:755)
at
org.geoserver.rest.catalog.FeatureTypeController.featureTypePost(FeatureTypeController.java:219)
at sun.reflect.GeneratedMethodAccessor554.invoke(Unknown Source)
//What solves my problem is a problem to me as well
This Stackexchange question
https://gis.stackexchange.com/questions/231259/geoserver-gives-schema-does-not-exist-after-creation-using-rest-interface
led me to try out opening the workspace from the Geoserver Admin UI and
clicking SAVE again.
And this seems to do away with the problem. But I think this is not
sustainable for me.
What is likely to be the problem, any proposals on how to deal with this.
Kind regards,
Steve Omondi
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
Please make sure you read the following two resources before posting to this
list:
- Earning your support instead of buying it, but Ian Turton:
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines:
http://geoserver.org/comm/userlist-guidelines.html
If you want to request a feature or an improvement, also see this:
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users