[OpenLayers-Users] WFS-T insert error

Roald de Wit list at rdewit.net
Sat May 8 03:08:59 EDT 2010


Hi João,

I noticed that the coordinates that get inserted seem to be in spherical 
mercator projection (or at least some projection that uses meters 
instead of degrees) without specifying the SRS in the WFS POST anywhere.
Try by either providing the correct projection or by converting your 
points to the projection your layer is in.

I hope that helps.

Regards, Roald

On 08/05/10 00:46, Jonas Blasques wrote:
> Hello everyone,
>
> I have a bug which I cannot solve. Was wandering if anyone could help.
>
> I am trying to save a single point to a vector layer (this is 
> originally a shp file which I uploaded to GeoServer in two ways - as 
> the shapefile itself and as a postgis table, both of them produce the 
> same error) following the wfs-t example that comes with geoserver 
> (geoserver/www/wfs-t.html).
> When I try with the default page it works and saves the point to 
> topp:tasmania_cities.
>
> Anyone has any ideas. I'm kind of in the dark. If you want any more 
> info about my data feel free to ask. I will answer immediately.
>
> Thanks, João
>
>
> Logs below:
>
> When I send this POST Request:
>
> |<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs" 
> version="1.0.0" service="WFS">
> |
> |<wfs:Insert>|
> ||
> |<feature||:pontos_interesse_min_postgis 
> xmlns:feature="http://localhost:8080/geoserver/peniche">|
> ||
> |<feature:the_geom||>|
> ||
> |<gml:MultiPoint xmlns:gml="http://www.opengis.net/gml">|
> ||
> |<gml:pointMember>|
> ||
> |<gml:Point>|
> ||
> |<gml:coordinates|| decimal="." cs="," ts=" ">
> |
> |14337.787617188,31343.8228125
> |
> |</gml:coordinates>|
> ||
> |</gml:Point>|
> ||
> |</gml:pointMember||>|
> ||
> |</gml:MultiPoint>|
> ||
> |</feature:the_geom>|
> ||
> |</feature:pontos_interesse_min_postgis>
> |
> |</wfs:Insert>|
> ||
> |</wfs:Transaction||>|
>
> The Response is:
>
> |<?xml version="1.0" encoding="UTF-8"?>
> <wfs:WFS_TransactionResponse version="1.0.0"
> xmlns:wfs="http:/||/www.opengis.net/wfs  <http://www.opengis.net/wfs>"
>
>
> xmlns:ogc="http://www.opengis.net/ogc"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"||
>
>
> xsi:schemaLocation="http://www.opengis.net/wfs  http://localhost:80/geoserver/schemas/wfs/1.0.0/WFS-transaction||.xsd">
>
>
> |
> |<wfs:InsertResult>
> |
> |<ogc:FeatureId fid="none"/>
> |
> |</wfs:InsertResult>
> <wfs:TransactionResult>
> |
> |<wfs:Status||>
> |
> |<wfs:FAILED/>
> |
> |</wfs:Status>
> <wfs:Message>
> |
> |Error performing insert
> |
> |</wfs:Message>
> |
> |</wfs:TransactionResult||>
> |
> |</wfs:WFS_TransactionResponse>
>
>
> |
>
> The GeoServer Log says:
>
> 2010-05-07 15:23:53,190 ERROR [geoserver.wfs] - Transaction failed
> org.geoserver.wfs.WFSTransactionException: Error performing insert
>
> 2010-05-07 15:23:53,192 INFO [geoserver.wfs] -
> Request: transaction
>     handle = null
>     service = WFS
>     version = 1.0.0
>     baseUrl = http://localhost:80/geoserver/
>     providedVersion = null
>     lockId = null
>     group = 
> [wfs:insert=net.opengis.wfs.impl.InsertElementTypeImpl at f53890 
> (feature: 
> [SimpleFeatureImpl:pontos_interesse_min_postgis=[SimpleFeatureImpl.Attribute: 
> objectid<objectid id=fid--6c61e3e8_128726979c6_-7fec>=null, 
> SimpleFeatureImpl.Attribute: id<id 
> id=fid--6c61e3e8_128726979c6_-7fec>=null, SimpleFeatureImpl.Attribute: 
> nome<nome id=fid--6c61e3e8_128726979c6_-7fec>=null, 
> SimpleFeatureImpl.Attribute: categoria<categoria 
> id=fid--6c61e3e8_128726979c6_-7fec>=null, SimpleFeatureImpl.Attribute: 
> dtcc<dtcc id=fid--6c61e3e8_128726979c6_-7fec>=null, 
> SimpleFeatureImpl.Attribute: the_geom<the_geom 
> id=fid--6c61e3e8_128726979c6_-7fec>=]], handle: null, idgen: <unset>, 
> inputFormat: <unset>, srsName: null)]
>     insert = [net.opengis.wfs.impl.InsertElementTypeImpl at f53890 
> (feature: 
> [SimpleFeatureImpl:pontos_interesse_min_postgis=[SimpleFeatureImpl.Attribute: 
> objectid<objectid id=fid--6c61e3e8_128726979c6_-7fec>=null, 
> SimpleFeatureImpl.Attribute: id<id 
> id=fid--6c61e3e8_128726979c6_-7fec>=null, SimpleFeatureImpl.Attribute: 
> nome<nome id=fid--6c61e3e8_128726979c6_-7fec>=null, 
> SimpleFeatureImpl.Attribute: categoria<categoria 
> id=fid--6c61e3e8_128726979c6_-7fec>=null, SimpleFeatureImpl.Attribute: 
> dtcc<dtcc id=fid--6c61e3e8_128726979c6_-7fec>=null, 
> SimpleFeatureImpl.Attribute: the_geom<the_geom 
> id=fid--6c61e3e8_128726979c6_-7fec>=]], handle: null, idgen: <unset>, 
> inputFormat: <unset>, srsName: null)]
>     update = []
>     delete = []
>     native = []
>     releaseAction = ALL
>
>
> The PostGre log does not report anything.
>
>
>
>
>
>
> -- 
> "Ajude um pouco ... já é muito"
> Projecto SOSIndia http://sosindia.net
> ---------------------------------------------
>
> Shoot for the moon,
> even if you miss it
> you will land among the stars.
> - Unknown
>
> -------------------------------------------------
>
> What if for a moment, as an experiment,
> you drop every belief that you have?
> - Unknown
>
> ---------------------------------------------------------------
>
> "We are all linked by a fabric of unseen connections. This fabric is 
> constantly changing and evolving. This field is directly structured 
> and influenced by our behavior and by our understanding."
> —David Bohm, quantum physicist, 1917–1992
>
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>    




More information about the Users mailing list