Hi Jerome,

Could it be the data? The invalidParameterValue exception in combination
with the value 48/6 in the id_comb column looks a bit tricky to me.
Perhaps the / needs to be encoded or escaped or so?

Cheers Kris

-----Original Message-----
From: [email protected] [mailto:[email protected]]
On Behalf Of Jerome Freyre
Sent: Thursday, August 06, 2009 11:54 AM
To: [email protected]
Subject: [OpenLayers-Users] OL, WFST-T, Geoserver | Problem on update


Hi List!

I have some datas in a PostgreSQL database. I recover datas trough
geoserver
via a vector layer with WFS protocol like it seems to be recommended.

I can easily (after some efforts :D ) add or delete somes features but I
am
unable to update a feature...

A xml sample that is posted to my geoserver :

<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs"; service="WFS"
version="1.1.0" xsi:schemaLocation="http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.1.0/wfs.xsd";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
        <wfs:Update typeName="topp:lumin">
                <wfs:Property>
                        <wfs:Name>the_geom</wfs:Name>
                        <wfs:Value>
                                <gml:Point
srsName="http://www.opengis.net/gml/srs/epsg.xml#EPSG:21781";>
                                        <gml:pos>538698.2299984342
182479.15984712465</gml:pos>
                                </gml:Point>
                        </wfs:Value>
                </wfs:Property>
                        <wfs:Name>puissance</wfs:Name>
                        <wfs:Value>125</wfs:Value>
                </wfs:Property>
                <wfs:Property>
                        <wfs:Name>rue</wfs:Name>
                        <wfs:Value>COIN DE TERRE, Rue du</wfs:Value>
                </wfs:Property>
                <wfs:Property>
                        <wfs:Name>num_apic</wfs:Name>
                        <wfs:Value>3974</wfs:Value>
                </wfs:Property>
                <wfs:Property>
                        <wfs:Name>id_comb</wfs:Name>
                        <wfs:Value>48/6</wfs:Value>
                </wfs:Property>
                <wfs:Property>
                        <wfs:Name>id_apic</wfs:Name>
                        <wfs:Value>141776</wfs:Value>
                </wfs:Property>
                <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc";>
                        <ogc:FeatureId fid="lumin.1233"/>
                </ogc:Filter>
        </wfs:Update>
</wfs:Transaction>

And the response (I put geoserver in verbose mode) :

<?xml version="1.0" encoding="UTF-8"?>
<ows:ExceptionReport version="1.0.0"
  xsi:schemaLocation="http://www.opengis.net/ows
http://localhost:8080/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd
"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:ows="http://www.opengis.net/ows";>
  <ows:Exception exceptionCode="InvalidParameterValue">
    <ows:ExceptionText>update error</ows:ExceptionText>
    <ows:ExceptionText>Details:</ows:ExceptionText>
    <ows:ExceptionText>org.geoserver.wfs.WFSException: update error
        at
org.geoserver.wfs.response.v1_1_0.TransactionResponse.write(TransactionR
esponse.java:49)
        at org.geoserver.ows.Dispatcher.response(Dispatcher.java:712)
        at
org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:216)
        at
org.springframework.web.servlet.mvc.AbstractController.handleRequest(Abs
tractController.java:153)
        at
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handl
e(SimpleControllerHandlerAdapter.java:48)
        at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherS
ervlet.java:875)
        at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherSe
rvlet.java:809)
        at
org.springframework.web.servlet.FrameworkServlet.processRequest(Framewor
kServlet.java:571)
        at
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet
.java:511)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
        at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
        at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHan
dler.java:1093)
        at
org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharac
terEncodingFilter.java:108)
        at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHan
dler.java:1084)
        at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(Filt
erChainProxy.java:265)
        at
org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterS
ecurityInterceptor.java:107)
        at
org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(Filte
rSecurityInterceptor.java:72)
        at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(Filt
erChainProxy.java:275)
        at
org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTransl
ationFilter.java:124)
        at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(Filt
erChainProxy.java:275)
        at
org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter
(AnonymousProcessingFilter.java:125)
        at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(Filt
erChainProxy.java:275)
        at
org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProce
ssingFilter.java:174)
        at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(Filt
erChainProxy.java:275)
        at
org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(H
ttpSessionContextIntegrationFilter.java:249)
        at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(Filt
erChainProxy.java:275)
        at
org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:1
49)
        at
org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java
:98)
        at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHan
dler.java:1084)
        at
org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:73)
        at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHan
dler.java:1084)
        at
org.geoserver.filters.ReverseProxyFilter.doFilter(ReverseProxyFilter.jav
a:163)
        at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHan
dler.java:1084)
        at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:47)
        at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHan
dler.java:1084)
        at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
        at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:2
16)
        at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
        at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726)
        at
org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
        at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandler
Collection.java:206)
        at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.jav
a:114)
        at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        at org.mortbay.jetty.Server.handle(Server.java:324)
        at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
        at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.j
ava:842)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)
        at
org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
        at
org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
        at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:
395)
        at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.ja
va:450)
</ows:ExceptionText>
  </ows:Exception>
</ows:ExceptionReport>


My wfs declaration :
                                var wfsLayer  = new
OpenLayers.Layer.Vector( 'lumin', {
                                                        strategies: [new
OpenLayers.Strategy.BBOX(),
saveStrategy ],
                                                        projection: new
OpenLayers.Projection("EPSG:21781"),
                                                        protocol: new
OpenLayers.Protocol.WFS({
                                                                version:
'1.1.0',
                                                                srsName:
'EPSG:21781',
                                                                url:
'http://localhost:8080/geoserver/wfs?strict=true',
        
featureNS : 
'http://www.openplans.org/topp',
        
featureType: 'lumin',
        
geometryName: 'the_geom',
        
extractAttribute:true})
                                                                });


And when I modify some feature attributes, I am doing this:
modifiedFeature.state = OpenLayers.State.UPDATE;

Am I doing something wrong? 
-- 
View this message in context:
http://n2.nabble.com/OL%2C-WFST-T%2C-Geoserver-%7C-Problem-on-update-tp3
397344p3397344.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to