Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am trying to save changes via WFS-T using GeoServer:

var editLayer = new OpenLayers.Layer.Vector("Edit Layer", {
        visibility: false,
        strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy],
        rendererOptions: { zIndexing: true },
        projection: new OpenLayers.Projection("EPSG:900913"),
        protocol: new OpenLayers.Protocol.WFS({
            srsName: "EPSG:900913",
            url: URL,
            featureType: "SETTLEMENTS",
            featureNS: NS,
            featurePrefix: Prefix,
            geometryName: "GEOM",
            version: "1.1.0"
        }),
        eventListeners: ...

But the server returns error:

<?xml version="1.0" encoding="UTF-8"?>
<ows:ExceptionReport version="1.0.0"
  xsi:schemaLocation="http://www.opengis.net/ows http://../geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ows="http://www.opengis.net/ows">
  <ows:Exception exceptionCode="NoApplicableCode">
    <ows:ExceptionText>{http://...}SETTLEMENTS is read-only</ows:ExceptionText>
  </ows:Exception>
</ows:ExceptionReport>

Why is the feature readonly and how to fix it?

share|improve this question
    
what sort of data source is underlying your layer? –  iant Jun 12 '12 at 14:26
    
@iant, Oracle database with SDO_GEOMETRY to store geometry data. –  0x49D1 Jun 12 '12 at 14:39
add comment

2 Answers 2

The most likely problem is that the user that is running GeoServer doesn't have write permission to the table (or one of the support metadata tables). If you are running inside Tomcat then there is (or should be) a tomcat user running the process who will almost certainly not have write permissions to the tables.

share|improve this answer
    
Yes, im using tomcat. Sorry, didnt mentioned that before. I was given the virtual machine with everything preinstalled, so dont know all the bones. Thank you for the answer, will check it tommorow morning, but think you're right. Also thank you for edit. –  0x49D1 Jun 12 '12 at 14:55
    
on geoserver in stores i have a 'map' user and in oracle ive granted all priviledges on the table i want edit/insert geometry. But nothing works. Cant find where is the connectin between tomcat and oracle..Where to grant something to tomcat user on oracle tables? Just found that im connecting using some username and granted priviledges to him. If i try to insert via wsf-t into another table that was created by user 'map' -everything works fine. The 'SETTLEMENTS' table was imported into oracle from shapefile before i was given the preinstalled geoserver/oracle server. –  0x49D1 Jun 13 '12 at 8:17
    
Can you, please, show how to grant persmissions on the needed tables to the user who is running geoserver? –  0x49D1 Jun 13 '12 at 8:19
    
Seems that i have THIS: comments.gmane.org/gmane.comp.gis.geoserver.user/21492 problem. –  0x49D1 Jun 13 '12 at 8:25
add comment
up vote 0 down vote accepted

The answer is: i had no PK on that table. To add it to existing table with records used this answer.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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