[OpenLayers-Users] OL, WFST-T, Geoserver | Problem on update
Jerome Freyre
jerome.freyre at hispeed.ch
Thu Aug 6 05:53:38 EDT 2009
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(TransactionResponse.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(AbstractController.java:153)
at
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
at
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.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(ServletHandler.java:1093)
at
org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265)
at
org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
at
org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at
org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:124)
at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at
org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at
org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:174)
at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at
org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
at
org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275)
at
org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149)
at
org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:73)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at
org.geoserver.filters.ReverseProxyFilter.doFilter(ReverseProxyFilter.java:163)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:47)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
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(ContextHandlerCollection.java:206)
at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java: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.java: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.java: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-tp3397344p3397344.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list