[Geoserver-users] Error updating geometry

I've got a serious problem that prevents me from updating the geometry of features.

I have a layer of lines connected to a postgis table.

I tried using a desktop client to add new features or to update existing ones.
I can:
- add a new feature
- update attributes of an existing feature

I can't:
- add a node to a geometry
- remove a node from a geometry
- move a node
- do any operation that changes the geometry of an existing feature

As a test I just added a line and committed it, then I moved one of the nodes of that line and I get the following (qgis) error:

Could not commit changes to layer xy

Errors: ERROR: 1 geometries not changed.

   Provider errors:
       unsuccessful service response: Update error: java.lang.String cannot be cast to com.vividsolutions.jts.geom.Geometry

I attach the geoserver log.

Geoserver 2.5

thank you
  maxx

updategeometry.log (39.2 KB)

Il 02/16/2015 10:46 PM, emmexx scrisse:

I've got a serious problem that prevents me from updating the geometry
of features.

I made another test using GeoExplorer, the boundless web app include in their suite.
If I use it instead of qgis or kosmo, I can update the geometry.

I compared the calls of kosmo and geoexplorer and they are a little bit different. I don't know if that is the problem or if there's a difference in the protocol used or the information sent to geoserver.

The geometry type of the layer is MultiLineString.

Geoexplorer posts the following to geoserver (firebug):

<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs&quot; service="WFS" version="1.1.0" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd&quot; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;&gt;
   <wfs:Update typeName="feature:bi18" xmlns:feature="http://example.org">
   <wfs:Property>
    <wfs:Name>geom</wfs:Name>
    <wfs:Value>
      <gml:MultiCurve xmlns:gml="http://www.opengis.net/gml&quot; srsName="EPSG:900913">
       <gml:curveMember>
        <gml:LineString>
          <gml:posList>1245136.542435711 5292736.678338301 1245079.6032993614 5292715.576567775</gml:posList>
        </gml:LineString>
       </gml:curveMember>
      </gml:MultiCurve>
    </wfs:Value>
   </wfs:Property>
   <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc&quot;&gt;
    <ogc:FeatureId fid="bi18.1477"/>
   </ogc:Filter>
   </wfs:Update>
</wfs:Transaction>

Kosmo log:

<wfs:Transaction version="1.0.0" service="WFS" xmlns:bicitalia="http://example.org" xmlns:gml="http://www.opengis.net/gml&quot; xmlns:ogc="http://www.opengis.net/ogc&quot; xmlns:wfs="http://www.opengis.net/wfs&quot; xmlns:xlink="http://www.w3.org/1999/xlink&quot; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd http://example.com.com:8080/geoserver/wfs?request=DescribeFeatureType&amp;SERVICE=WFS&amp;REQUEST=DescribeFeatureType&amp;version=1.0.0&amp;TYPENAME=example:bi18&amp;NAMESPACE=xmlns(example=http://example.org) http://example.org">
   <wfs:Update typeName="example:bi18">
   <wfs:Property>
    <wfs:Name>example:geom</wfs:Name>
    <wfs:Value>
      <gml:MultiLineString xmlns:gml="http://www.opengis.net/gml&quot; srsName="EPSG:4326">
       <gml:lineStringMember>
        <gml:LineString xmlns:gml="http://www.opengis.net/gml&quot; srsName="EPSG:4326">
          <gml:coordinates>11.362,42.982 11.362,42.982 11.361,42.981 11.361,42.982 11.361,42.982 11.36,42.981 11.36,42.981 11.359,42.981 </gml:coordinates>
        </gml:LineString>
       </gml:lineStringMember>
      </gml:MultiLineString>
      </wfs:Value>
   </wfs:Property>
   <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc&quot;&gt;
    <ogc:FeatureId fid="bi18.1477"/>
   </ogc:Filter>
   </wfs:Update>
</wfs:Transaction>

Bye
  maxx

Ciao Maxx,
I don't have an immediate answer for this.

I would open a JIRA to report this problem so that we don't loose track of it.

Regards,
Simone Giannecchini

GeoServer Professional Services from the experts! Visit
http://goo.gl/NWWaa2 for more information.

Ing. Simone Giannecchini
@simogeo
Founder/Director

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 333 8128928

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------
AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate.
Il loro utilizzo è consentito esclusivamente al destinatario del
messaggio, per le finalità indicate nel messaggio stesso. Qualora
riceviate questo messaggio senza esserne il destinatario, Vi preghiamo
cortesemente di darcene notizia via e-mail e di procedere alla
distruzione del messaggio stesso, cancellandolo dal Vostro sistema.
Conservare il messaggio stesso, divulgarlo anche in parte,
distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità
diverse, costituisce comportamento contrario ai principi dettati dal
D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely
for the attention and use of the named addressee(s) and may be
confidential or proprietary in nature or covered by the provisions of
privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New
Data Protection Code).Any use not in accord with its purpose, any
disclosure, reproduction, copying, distribution, or either
dissemination, either whole or partial, is strictly forbidden except
previous formal approval of the named addressee(s). If you are not the
intended recipient, please contact immediately the sender by
telephone, fax or e-mail and delete the information in this message
that has been received in error. The sender does not give any warranty
or accept liability as the content, accuracy or completeness of sent
messages and accepts no responsibility for changes made after they
were sent or for other risks which arise as a result of e-mail
transmission, viruses, etc.

On Fri, Feb 20, 2015 at 1:28 PM, emmexx <emmexx@anonymised.com> wrote:

Il 02/16/2015 10:46 PM, emmexx scrisse:

I've got a serious problem that prevents me from updating the geometry
of features.

I made another test using GeoExplorer, the boundless web app include in
their suite.
If I use it instead of qgis or kosmo, I can update the geometry.

I compared the calls of kosmo and geoexplorer and they are a little bit
different. I don't know if that is the problem or if there's a
difference in the protocol used or the information sent to geoserver.

The geometry type of the layer is MultiLineString.

Geoexplorer posts the following to geoserver (firebug):

<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs&quot; service="WFS"
version="1.1.0" xsi:schemaLocation="http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.1.0/wfs.xsd&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;&gt;
   <wfs:Update typeName="feature:bi18" xmlns:feature="http://example.org">
         <wfs:Property>
                <wfs:Name>geom</wfs:Name>
                <wfs:Value>
                  <gml:MultiCurve xmlns:gml="http://www.opengis.net/gml&quot;
srsName="EPSG:900913">
                         <gml:curveMember>
                                <gml:LineString>
                                  <gml:posList>1245136.542435711 5292736.678338301
1245079.6032993614 5292715.576567775</gml:posList>
                                </gml:LineString>
                         </gml:curveMember>
                  </gml:MultiCurve>
                </wfs:Value>
         </wfs:Property>
         <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc&quot;&gt;
                <ogc:FeatureId fid="bi18.1477"/>
         </ogc:Filter>
   </wfs:Update>
</wfs:Transaction>

Kosmo log:

<wfs:Transaction version="1.0.0" service="WFS"
xmlns:bicitalia="http://example.org"
xmlns:gml="http://www.opengis.net/gml&quot;
xmlns:ogc="http://www.opengis.net/ogc&quot;
xmlns:wfs="http://www.opengis.net/wfs&quot;
xmlns:xlink="http://www.w3.org/1999/xlink&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
xsi:schemaLocation="http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd
http://example.com.com:8080/geoserver/wfs?request=DescribeFeatureType&amp;SERVICE=WFS&amp;REQUEST=DescribeFeatureType&amp;version=1.0.0&amp;TYPENAME=example:bi18&amp;NAMESPACE=xmlns(example=http://example.org)
http://example.org">
   <wfs:Update typeName="example:bi18">
         <wfs:Property>
                <wfs:Name>example:geom</wfs:Name>
                <wfs:Value>
                  <gml:MultiLineString xmlns:gml="http://www.opengis.net/gml&quot;
srsName="EPSG:4326">
                         <gml:lineStringMember>
                                <gml:LineString xmlns:gml="http://www.opengis.net/gml&quot;
srsName="EPSG:4326">
                                  <gml:coordinates>11.362,42.982 11.362,42.982 11.361,42.981
11.361,42.982 11.361,42.982 11.36,42.981 11.36,42.981 11.359,42.981
</gml:coordinates>
                                </gml:LineString>
                         </gml:lineStringMember>
                  </gml:MultiLineString>
                  </wfs:Value>
         </wfs:Property>
         <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc&quot;&gt;
                <ogc:FeatureId fid="bi18.1477"/>
         </ogc:Filter>
   </wfs:Update>
</wfs:Transaction>

Bye
        maxx

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Il 02/23/2015 12:46 AM, Simone Giannecchini scrisse:

I would open a JIRA to report this problem so that we don't loose track of it.

Ok, thank you for your answer.

Yesterday I upgraded opengeo suite to 4.5, and geoserver to 2.6. Same problem. Even worse than before. :frowning:

Now I can only change attributes of features.
With version 4.1 of the suite I could add new features but not modify geometries. Now I can't add new features nor update their geometries.

Tested with qgis and Kosmo.

Bye
  maxx