From: Paweł P. <ppa...@gm...> - 2010-03-19 07:35:51
|
Hi Hi! I am using GWT with Openlayers 2.8. My goal is to save, delete and modify object from Web Browser. I am using for that Vector layer with WFSProtocol. I wrote 'save strategy' class for vector layer, because it has not been included into GWT-OL library yet. When I try to save some features to the database I got in firebug error: * <ServiceException> java.lang.RuntimeException: Parsing failed for the_geom: java.lang.ClassCastException: com.vividsolutions.jts.geom.LineString cannot be cast to com.vividsolutions.jts.geom.MultiLineString Parsing failed for the_geom: java.lang.ClassCastException: com.vividsolutions.jts.geom.LineString cannot be cast to com.vividsolutions.jts.geom.MultiLineString com.vividsolutions.jts.geom.LineString cannot be cast to com.vividsolutions.jts.geom.MultiLineString </ServiceException></ServiceExceptionReport>* I was thinking that maybe I have done some mistakes when I create new classes but it was not that. I know why is that. The reason is that I use version of WFS 1.0.0 in declaration of wfsProtocolOptions but in this version that kind of error happens when you try to add LineString geometry to MultiLineString. This was fixed in wfs 1.1.0 but unfortunately when I change the version of WFSprotocol to 1.1.0 my *Vector layer does not appear on the map - IT DOES NOT WORK*. Why is that?? How come version 1.1.0 of WFS does not work in GWT-OL. I have also checked everything in pure JS. In version 1.0.0 of WFSProtocol I got this same error, but when I change the version to 1.1.0 everything work just fine. The new geometry was added to the database, and of course I can see my vector layer on the map. Did anyone have this kinds of problems? Regards, Poul |