Hi,
I use the following versions:
geoserver = 1.3.1
datastore = postgis 1.1.1
I've been writing some code that allows Geoserver's WFS to output additional formats by making a call to the GDAL/OGR utility 'ogr2ogr'. Since Geoserver already generates shape files I extract the data in this format and then run the ogr2ogr tool to get the format specified by the WFS outputFormat request parameter. This is done by creating an org.vfny.geoserver.wfs.responses.OGRFeatureResponseDelegate which contains the basic behaviour for OGR conversion and creating concrete classes to provide specific parameters for the ogr2ogr tool.
One of the tables I'm trying to extract features from is causing a problem:
org.geotools.data.shapefile.shp.ShapefileException: Cannot handle geometry class : com.vividsolutions.jts.geom.Geometry
at org.geotools.data.shapefile.shp.JTSUtilities.getShapeType(JTSUtilities.java:363)
at org.geotools.data.shapefile.ShapefileDataStore$Writer.flush(ShapefileDataStore.java:1335)
at org.geotools.data.shapefile.ShapefileDataStore$Writer.close(ShapefileDataStore.java:1425)
at org.geotools.data.InProcessLockingManager$1.close(InProcessLockingManager.java:344)
at org.geotools.data.AbstractFeatureStore.addFeatures(AbstractFeatureStore.java:232)
at org.vfny.geoserver.wfs.responses.ShapeFeatureResponseDelegate.writeOut(ShapeFeatureResponseDelegate.java:294)
at org.vfny.geoserver.wfs.responses.ShapeFeatureResponseDelegate.encode(ShapeFeatureResponseDelegate.java:208)
at org.vfny.geoserver.wfs.responses.OGRFeatureResponseDelegate.getShapeZip(OGRFeatureResponseDelegate.java:276)
at org.vfny.geoserver.wfs.responses.OGRFeatureResponseDelegate.encode(OGRFeatureResponseDelegate.java:153)
at org.vfny.geoserver.wfs.responses.FeatureResponse.writeTo(FeatureResponse.java:132)
at org.vfny.geoserver.servlets.AbstractService.doService(AbstractService.java:520)
at org.vfny.geoserver.servlets.AbstractService.doGet(AbstractService.java:279)
at org.vfny.geoserver.wfs.servlets.WfsDispatcher.doResponse(WfsDispatcher.java:290)
at org.vfny.geoserver.wfs.servlets.WfsDispatcher.doGet(WfsDispatcher.java:219)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
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:111)
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.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)
Does anyone know why this might be happening?
I'm happy to provide the code if anyone wants to use it or needs to see it to help with the problem.
Thanks,
Duncan Clarkson