[Geoserver-users] problems with digitize GUI with geoserver as WFS-T

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&quot; xmlns:chennai="http://www.geographie.uni-freiburg.de:7080/geoserver/wfs?&quot; xmlns:gml="http://www.opengis.net/gml&quot; xmlns:xs="http://www.w3.org/2001/XMLSchema&quot; xmlns:citef="http://www.opengis.net/cite/functions&quot; xmlns:ogc="http://www.opengis.net/ogc&quot; xmlns:xsi="http://www.w3.org/2001/XMLSchema\-instance&quot; xmlns:topp="http://www.someserver.com/topp&quot; xmlns:wfs="http://www.opengis.net/wfs&quot; 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&quot;&gt;&lt;wfs:UpdatetypeName=&quot;chennai:floods&quot;&gt;&lt;wfs:Property&gt;&lt;wfs:Name&gt;notes&lt;/wfs:Name&gt;&lt;wfs:Value&gt;blablub&lt;/wfs:Value&gt;&lt;/wfs:Property&gt;&lt;wfs:Property&gt;&lt;wfs:Name&gt;year&lt;/wfs:Name&gt;&lt;wfs:Value&gt;1998&lt;/wfs:Value&gt;&lt;/wfs:Property&gt;&lt;wfs:Property&gt;&lt;wfs:Name&gt;the\_geom&lt;/wfs:Name&gt;&lt;wfs:Value&gt;&lt;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

Marco Lechner ha scritto:

Dear geoserver users,

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".

Hum, yes, it does ring a bell, but we need the full stack trace, having just the illegal argument exception statement is useless for debugging
purposes. Can you paste all the lines below the illegalargumentexception, including whatever "caused" by exception is there? I think the easiest solution is to set the log level to info,
restart geoserver, and provide us with a full log of the interaction.
Please, gather the log, open a Jira issue, and attach the log there.

Cheers
Andrea