2

After creating a table in Postgis, making it available in Geoserver and then creating the necessary stores and layers, I loaded the resulting WFS file in QGIS.

When trying to populate the features with an edit, I get faced with the following error:

Could not commit changes to layer teststore:test

Errors: ERROR: 1 feature(s) not added. Provider errors: WFS service exception: {http://geoserver.org/teststore}test is read-only

I have admin privileges in Geoserver and Postgres, and I haven't found anything resembling a read only restriction.

How to get around this problem?

  • You should read up on WFS-T. – HeikkiVesanto Jun 1 '16 at 14:43
  • @Vesanto care to elaborate? – Luffydude Jun 1 '16 at 16:32
  • It's hard to tell from your question what you have tried in GeoServer, and I no expert on the matter. But WFS does not support editing. For editing you will need WFS-T, which is transactional WFS. – HeikkiVesanto Jun 1 '16 at 16:34
  • @Vesanto Like I've said, I simply tried adding the Geoserver layer as a WFS but when I tried editing, it did not work saying it was read only. I don't see any option to make it a WFS-T and my internet search didn't produce any result – Luffydude Jun 1 '16 at 16:41
1

The typical reason for this errors is that the underlying table does not have a primary key, it's a view in the database, or the layer is configured as "sql view" in GeoSever

  • It had a primary key, the problem was SQL view but now I'm not sure how I did it but it got fixed and now I'm able to fix my edits – Luffydude Jun 7 '16 at 8:20
-1

Problem was solved by enabling jsonp in the geoserver

  • How are these thing related? Why would you need to enable jsonp to do a WFS insert? – ca0v Feb 24 '17 at 21:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.