Dear geoserver users,
I already posted this to the mapbender-users-list, because first of all I thought it's a mapbender-configuration problem. but it seems to be a problem in geoserver (1.5.0-rc2).
I started a little Mapbender-Installation using Version 2.4.1 (2007-03-12) (svn)
Created a nice GUI using the digitize GUI as template. I want to write some polygons via geoserver into a postgis-DB.
But I just get the message "An error occured" while trying to save the polygon to the wfs in mapbender.
Having a look to the apache-log it looks o.k.:
..."POST /chennai/mapbender_svn/extensions/geom2wfst.php HTTP/1.1" 200 20
and also the transmitted values POSTed to geoserver seem to be valid:
... <wfs:Transaction version="1.0.0" service="WFS" xmlns="http://www.someserver.com/myns" xmlns:chennai="http://www.geographie.uni-freiburg.de:7080/geoserver/wfs?" xmlns:gml="http://www.opengis.net/gml" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:citef="http://www.opengis.net/cite/functions" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema\-instance" xmlns:topp="http://www.someserver.com/topp" xmlns:wfs="http://www.opengis.net/wfs" xsi:schemaLocation="http://www.someserver.com/myns http://wms1.ccgis.de/geoserver-1.3-beta4/wfs/getCapabilities?request=describefeaturetype http://www.opengis.net/wfs\.\./wfs/1\.0\.0/WFS\-transaction\.xsd"><wfs:UpdatetypeName="chennai:floods"><wfs:Property><wfs:Name>notes</wfs:Name><wfs:Value>blablub</wfs:Value></wfs:Property><wfs:Property><wfs:Name>year</wfs:Name><wfs:Value>1998</wfs:Value></wfs:Property><wfs:Property><wfs:Name>the\_geom</wfs:Name><wfs:Value><gml:MultiPolygon srsName="EPSG:4326"><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>80.234,12.971 80.241,12.964 80.253,12.976 80.234,12.971</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember></gml:MultiPolygon></wfs:Value></wfs:Property><ogc:Filter><ogc:FeatureId fid="false"/></ogc:Filter></wfs:Update></wfs:Transaction>
I tried to find the bug or misconfiguration in mapbender because I can edit the relevant WFS-layer using udig via geoserver without any problems. Where could there be misconfiguration? What could I try next?
I was able to narrow the problem a little bit down:
The WFS-T works together with mapbender without problems editing, moving, creating, and deleting of pointProperties. The error only occurs with MultiPolygon / Polygon. In the geoserver.log (wich produces about 4000 lines if loging "FEINER" just for one polygon-transaction I get the error message (if this is the relevant error):
23.03.2007 15:07:05 org.vfny.geoserver.servlets.AbstractService sendError
SCHWERWIEGEND: Service exception occurred
org.vfny.geoserver.wfs.WfsException: java.lang.RuntimeException: problem creating feature
...
Caused by: IllegalAttribute: com.vividsolutions.jts.geom.Polygon , but got com.vividsolutions.jts.geom.MultiPolygon
...
Caused by: java.lang.IllegalArgumentException: com.vividsolutions.jts.geom.MultiPolygon is not an acceptable class for the_geom as it is not assignable from class com.vividsolutions.jts.geom.Polygon
...
Does this ring a bell?
The postgis polygon is of type MULTIPOLYGON in the "geometry_columns" - in geoserver the type is also multiPolygonProperty and mapbender handles the data also as "MultiPolygonPropertyType".
Seems to be a similar problem like (?):
http://www.nabble.com/Speicherung-von-digitalisierten-Daten-über-Geoserver-und-Postgis-t2938289.html
But my describefeaturetype works with this URL:
http://www.geographie.uni-freiburg.de:7080/geoserver/wfs?REQUEST=describefeaturetype&typename=floods
bzw. http://www.geographie.uni-freiburg.de:7080/geoserver/wfs?REQUEST=describefeaturetype
Well, to be honest - I think there's still a lot for me to learn in this domain.
Does anybody have an idea what I could try out next?
Marco
----------
Department of Physical Geography
Werderring 4
79085 Freiburg
0761/203-3548
Germany