Hi, list!
I'm trying to make a WFS insert transaction with OpenLayers to a GS 2.1.2
PostGIS layer.
My request is:
<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs" service="WFS"
version="1.0.0" xsi:schemaLocation="http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<wfs:Insert>
<feature:plots xmlns:feature="landws">
<feature:the_geom>
<gml:MultiPolygon xmlns:gml="http://www.opengis.net/gml" srsName="EPSG:900913">
<gml:polygonMember>
<gml:Polygon>
<gml:outerBoundaryIs>
<gml:LinearRing>
<gml:coordinates decimal="." cs="," ts=" ">4112493.6591121,7609090.535939
4111461.7592304,7607867.5434866 4114041.5089347,7606701.8788054
4114098.8367059,7609472.7210804 4112493.6591121,7609090.535939</gml:coordinates>
</gml:LinearRing>
</gml:outerBoundaryIs>
</gml:Polygon>
</gml:polygonMember>
</gml:MultiPolygon>
</feature:the_geom>
</feature:plots>
</wfs:Insert>
</wfs:Transaction>
I get a <wfs:FAILED/> status in the response.
The log says:
2011-12-13 21:24:27,583 INFO [geoserver.wfs] -
Request: getServiceInfo
2011-12-13 21:24:27,600 INFO [geoserver.gwc] - DataStoreChange: {landws}plots
PreInsert
2011-12-13 21:24:27,604 ERROR [geoserver.wfs] - Transaction failed
org.geoserver.wfs.WFSTransactionException: Error performing insert:
java.lang.String cannot be cast to com.vividsolutions.jts.geom.Geometry
at
org.geoserver.wfs.InsertElementHandler.execute(InsertElementHandler.java:205)
at org.geoserver.wfs.Transaction.execute(Transaction.java:333)
at org.geoserver.wfs.Transaction.transaction(Transaction.java:108)
at
org.geoserver.wfs.DefaultWebFeatureService.transaction(DefaultWebFeatureService.java:162)
….
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to
com.vividsolutions.jts.geom.Geometry
at org.geotools.jdbc.JDBCDataStore.insertSQL(JDBCDataStore.java:3445)
at org.geotools.jdbc.JDBCDataStore.insert(JDBCDataStore.java:1410)
….
The request is generated by OpenLayers, so I guess that coordinates are right.
Can anyone please help? I'm stuck with investigating on it.
------------------------------------------------------------------------------
Systems Optimization Self Assessment
Improve efficiency and utilization of IT resources. Drive out cost and
improve service delivery. Take 5 minutes to use this Systems Optimization
Self Assessment. http://www.accelacomm.com/jaw/sdnl/114/51450054/
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users