Grazie Andrea,
the error sounded strange as I normally used 1.1 on the same layers with no problems and I'm using the latest stable GS and Geotools. I have tried forcing use of WFS 1.0 but that only helped discover a deeper problem. So - what do you think of this:
we now configure our layers using REST as I said. Looking at the layer page in the GS web GUI, everything looks fine at a superficial level, but at a closer look, all those layers that cause the Curve exception show the type of the the_geom attribute as "Geometry" (while those we add by hand have a non-abstract geometry type as expected). Therefore what it looks like is that the REST configuration does not do some kind of critical validation of the data, and the two versions of WFS/GML merely expose the problem differently: by not finding any feature in 1.0, and by throwing the Curve exception (which at this point I assume is a generic type that it defaults to when the geometry type is unknown) in 1.1.
Does this expose a bug, and if so, ours or yours? I must also mention that "Reload feature type" does not help, that we haven't tried the unstable/beta GS yet, and that these are all Postgis-backed layers.
Grazie mille,
ferdinando
On 11/23/2010 10:48 AM, Andrea Aime wrote:
On Tue, Nov 23, 2010 at 10:34 AM, Ferdinando Villa
<ferdinando.villa@anonymised.com> wrote:
Hi good people,
we run a 2.0.2 instance here where we have configured a huge amount of
layers using custom software that uses REST to transfer configuration
from an Excel spreadsheet to GS. After hitting several snags, everything
finally seems to work fine, except that our applications fail when we
create a geotools FeatureIterator at the client side to access any line
layers (polygons are ok). The error we get at the client side is
unrecognized geometry element {http://www.opengis.net/gml\}Curve
which seems related to the GML version and to sending Curve instead of
LineString, but I don't see any way of configuring that at either side.
During the time when GeoTools tries to instantiate the iterator,
communication with GS fills the GS log with
WARNING: geotools.xml: Binding: {http://www.opengis.net/gml\}CircleType
returns null type.
Any suggestions before I start gasping through the GeoServer code
tomorrow? Appreciate any help. Let us know if you think the software we
use could be of any general utility.
Lines are deprecated in GML3, if you need them you should use GML2
(WFS 1.0) instead.
GML2 is also faster to generate and its GeoTools parser has been
around for longer
so it may be more stable (this is especially true if you're not using the latest
GeoTools release)
Cheers
Andrea
-----------------------------------------------------
Ing. Andrea Aime
Senior Software Engineer
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584962313
fax: +39 0584962313
http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf
-----------------------------------------------------