Monday, November 13, 2017

Geoserver WFS-T PostGIS (PostgreSQL) Layer Read-Only

An unexpected Read-Only message is common when attempting a Geoserver WFS-T request via the Demo page.  This is also true of WFS-T on a PostGIS-backed Layer.

Here are a list of possible culprits:

  1. Verify the layer is writable by the Postgres role (user account) which you've used to authenticate in Geoserver, via the Store dialog for that Layer.
  2. The table must have a primary key in Postgres.  It may be necessary to "Reload Feature Type" under the Layer page > Data Tab > Feature Type Details section.  It also be necessary to "Expose Primary Keys" in the Store for the Layer.
  3. The WFS-T Demos will not successfully authenticate out-of-the-box (which will probably give a different error message).  See my post on the issue, and how to resolve it.
  4. If you are using my work around, linked from above, you are using anonymous authentication (for testing only, of course!).  You will need to create a write rule that applies to the anonymous role and the workspace which relates to your Layer/Store.

In my latest experience with this error, culprit #4 got me :-p
Post a Comment