With Geoserver-1.4.0-M2-WCS (and 1.3.4a, and 1.3.3a) I can no longer
insert new WFS features (in a PostGIS datastore). [With 1.3.0a I can.]
The request that's being sent is:
POST /geoserver/wfs HTTP/1.1
User-Agent: Jakarta Commons-HttpClient/2.0.1
Host: localhost:8888
Content-Length: 628
<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs"><wfs:Insert><edd:alerts xmlns:edd="http://www.west.nl/edd">
<edd:mmsiNumber>test</edd:mmsiNumber>
<edd:weight>1.0</edd:weight>
<edd:length>2.0</edd:length>
<edd:width>3.0</edd:width>
<edd:draught>4.0</edd:draught>
<edd:height>5.0</edd:height>
<edd:geom>
<gml:Point xmlns:gml="http://www.opengis.net/gml" srsName="epsg:4326">
<gml:coordinates decimal="." cs="," ts=" ">2.83,52.54</gml:coordinates>
</gml:Point>
</edd:geom>
<edd:timestamp>13/10/2006 08:45</edd:timestamp>
</edd:alerts></wfs:Insert></wfs:Transaction>
The response from Geoserver is:
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=420BA66CF8C5A525B539582117C2C84C; Path=/geoserver
Content-Type: text/xml;charset=UTF-8
Content-Length: 476
Date: Fri, 13 Oct 2006 08:45:31 GMT
<?xml version="1.0" ?>
<ServiceExceptionReport
version="1.2.0"
xmlns="http://www.opengis.net/ogc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/ogc http://localhost:8888/geoserver/schemas/wfs/1.0.0/OGC-exception.xsd">
<ServiceException>
org.geotools.data.DataSourceException: Could not create alerts out of provided feature: fid--1043f4e5:10e40d10b4d:-7ffc </ServiceException>
</ServiceExceptionReport>
Something seems to be going wrong with interpreting the XML, although my
schema for the edd:alerts feature type is correct.
The relevant entries in the Geoserver log are:
13-Oct-2006 10:38:01 org.vfny.geoserver.util.requests.readers.DispatcherXmlReader getRequest
INFO: getting request type from org.vfny.geoserver.util.requests.DispatcherHandler@anonymised.com
13-Oct-2006 10:38:01 org.vfny.geoserver.wfs.requests.InsertRequest addFeature
INFO: got type alerts,http://www.west.nl/edd
13-Oct-2006 10:38:01 org.vfny.geoserver.servlets.AbstractService doService
INFO: handling request: Lock Id: null
releaseAction: ALL
handle: null
Handle: null alerts 1
ReleaseAll: false
TypeName: alerts
Feature[ id=fid--1043f4e5:10e40d10b4d:-7fff , mmsiNumber=test , weight=1.0 , length=2.0 , width=3.0 , draught=4.0 , height=5.0 , geom=POINT (3.3925 52.81) , timestamp=Fri Oct 13 08:38:00 CEST 2006 ]
13-Oct-2006 10:38:01 org.vfny.geoserver.servlets.AbstractService doService
WARNING: service exception while executing request: Lock Id: null
releaseAction: ALL
handle: null
Handle: null alerts 1
ReleaseAll: false
TypeName: edd:alerts
Feature[ id=fid--1043f4e5:10e40d10b4d:-7fff , mmsiNumber=test , weight=1.0 , length=2.0 , width=3.0 , draught=4.0 , height=5.0 , geom=POINT (3.3925 52.81) , timestamp=Fri Oct 13 08:38:00 CEST 2006 ]
cause: org.geotools.data.DataSourceException: Could not create alerts out of provided feature: fid--1043f4e5:10e40d10b4d:-7fff
13-Oct-2006 10:38:01 org.vfny.geoserver.ServiceException getXmlResponse
WARNING: encountered error: org.geotools.data.DataSourceException: Could not create alerts out of provided feature: fid--1043f4e5:10e40d10b4d:-7fff
StackTrace: org.geotools.data.DataSourceException: Could not create alerts out of provided feature: fid--1043f4e5:10e40d10b4d:-7fff
at org.geotools.data.jdbc.JDBCFeatureStore.addFeatures(JDBCFeatureStore.java:331)
at org.vfny.geoserver.global.GeoServerFeatureStore.addFeatures(GeoServerFeatureStore.java:87)
at org.vfny.geoserver.wfs.responses.TransactionResponse.execute(TransactionResponse.java:442)
at org.vfny.geoserver.wfs.responses.TransactionResponse.execute(TransactionResponse.java:118)
at org.vfny.geoserver.servlets.AbstractService.doService(AbstractService.java:511)
at org.vfny.geoserver.servlets.AbstractService.doPost(AbstractService.java:436)
at org.geoserver.request.Dispatcher.post(Dispatcher.java:267)
at org.geoserver.request.Dispatcher.dispatch(Dispatcher.java:159)
at org.geoserver.request.Dispatcher.handleRequestInternal(Dispatcher.java:54)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:139)
at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:44)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:684)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:625)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:392)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:357)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:122)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Caused by: IllegalAttribute: com.vividsolutions.jts.geom.Point , but got java.lang.Double
at org.geotools.feature.DefaultFeature.setAttribute(DefaultFeature.java:215)
at org.geotools.feature.DefaultFeature.setAttributes(DefaultFeature.java:256)
at org.geotools.data.jdbc.JDBCFeatureStore.addFeatures(JDBCFeatureStore.java:329)
... 34 more
Caused by: java.lang.IllegalArgumentException: AttributeGT.Geometric cannot parse 5.0
at org.geotools.feature.type.GeometricAttributeType.parse(GeometricAttributeType.java:117)
at org.geotools.feature.DefaultFeature.setAttribute(DefaultFeature.java:211)
... 36 more
Regards,
--
-- Gertjan van Oosten, gertjan@anonymised.com, West Consulting B.V., +31 15 2191 600