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 have a DrawFeature tool.

create= new OpenLayers.Control.DrawFeature(myVecLayer,
OpenLayers.Handler.Polygon);
app.mapPanel.map.addControl(create);

i have a store.

                            st = new GeoExt.data.FeatureStore({
                                layer: myVecLayer,
                                fields: [
                                    {name: 'id', type: 'int'},
                                    {name: 'mydata', type: 'String'},
                                ],
                                 proxy: new GeoExt.data.ProtocolProxy({
                                    protocol: new OpenLayers.Protocol.WFS({
                                        version: "1.0.0",
                                        srsName:"EPSG:900913",
                                        url: "http://localhost:8080/geoserver/wfs",
                                        featureType: "filedata_temp",
                                        featureNS: "http://www.opengeospatial.net/cite",
                                        filter:Ffilter
                                    })
                                }),
                                autoLoad: true
                            });

I start drawning

for(var i=0;i<create_cont.length;i++){
 create_cont[1].activate();
}

After i put attributes to feature and save result

Openlayers.Strategy.Save().save()

But its not saved.

POST

<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs" service="WFS" version="1.1.0"  xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <wfs:Insert>
  <feature:filedata_temp xmlns:feature="http://www.opengeospatial.net/cite">
   <feature:the_geom>
    <gml:Polygon xmlns:gml="http://www.opengis.net/gml" srsName="EPSG:900913">
     <gml:exterior>
      <gml:LinearRing>
       <gml:posList>6756846.305626001 7731074.3336396 6756578.776027001 7730338.6272425 6757696.667564999 7730118.8707862 6758441.928590998 7730978.7873543 6756846.305626001 7731074.3336396</gml:posList>
      </gml:LinearRing>
     </gml:exterior>
    </gml:Polygon>
   </feature:the_geom>
   <feature:id>10</feature:id>
    <feature:mydata>10</feature:mydata>
  </feature:filedata_temp>
 </wfs:Insert>
</wfs:Transaction>

ANSWER

<ows:ExceptionReport version="1.0.0" xsi:schemaLocation="http://www.opengis.net/ows http://localhost:8080/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="InvalidParameterValue">
  <ows:ExceptionText>Error performing insert: Error inserting features</ows:ExceptionText>
 </ows:Exception>
</ows:ExceptionReport>

What i doing wrong?

share|improve this question
    
It was a PostgresSql bug. I have a two tables whis triggers. If i insert data in first table trigger insert data in second too. But if trigger do this second table's trigger insert data in first table etc. So all what i write in code works fine. –  Kliver Max Aug 3 '12 at 7:02
1  
If that is the solution to this problem could you post it as an answer, see meta.gis.stackexchange.com/questions/848/… –  Rob Quincey Aug 4 '12 at 21:25
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.