John Preston ha scritto: > Any help would be appreciated. I have juat created a Shapefile data > store plugin which access the four > shape file components (.shp,.shx,.dbf,.prj) which are stored in a > repository via a single file url. I used > the ShapefileDataStore and ShapefileDataStoreFactory as templates, and > it seems to work. What I > basically do is parse the single file to get the url's for the > component files and then instantiate > readers for therm. It seems to work, and I can load data and view it > in the demo window > of geoserver. > > However when I look in the tomcat logs I see the following exception message: > > java.io.FileNotFoundException: > http://localhost:8090/library/bitstream/1876/15/10/parishes.spl.dbf > at > sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1239) > at > org.geotools.data.shapefile.ShapefileDataStore.getReadChannel(ShapefileDataStore.java:329) > at > org.geotools.data.shapefile.ShapefileRendererUtil.getDBFReader(ShapefileRendererUtil.java:101) > at > org.geotools.renderer.shape.ShapefileRenderer.getDBFHeader(ShapefileRenderer.java:270) > at > org.geotools.renderer.shape.ShapefileRenderer.createFeatureType(ShapefileRenderer.java:761) > at > org.geotools.renderer.shape.ShapefileRenderer.processStylers(ShapefileRenderer.java:300) > at > org.geotools.renderer.shape.ShapefileRenderer.paint(ShapefileRenderer.java:1399) > at > org.geotools.renderer.shape.ShapefileRenderer.paint(ShapefileRenderer.java:262) > at > org.vfny.geoserver.wms.responses.DefaultRasterMapProducer.produceMap(DefaultRasterMapProducer.java:310) > at > org.vfny.geoserver.wms.responses.GetMapResponse.execute(GetMapResponse.java:424) > at > org.geoserver.ows.adapters.ResponseAdapter.getMimeType(ResponseAdapter.java:48) > at org.geoserver.ows.Dispatcher.response(Dispatcher.java:616) > at > org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:192) > 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.doGet(FrameworkServlet.java:347) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:690) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) > > The http://localhost:8090/library/bitstream/1876/15/10/parishes.spl is > the file which holds the > list of urls for the various components and is what is sepcified inn > the datastore connection. > > It appears to me that in the map renderer the factory data store is > not used to instantiate a data store > but the classic shapefile data store. Can someone say anything about > this, or am I missing something.
When you create a datastore with GeoServer a property map is built with the parameters, and then a finder scans the SPI for all the datastores, and asks each if it can handle the provided parameters. Given you used shapefile datastore as a template, your datastore probably asks only for a URL, meaning that both the shapefile datastore and yours do respond "true" to the request on whether they can handle the parameter. Maybe try adding a new parameter to your reader with a default value so that it can be differentiated from the shapefile one. Oh, btw, I'm curious, how is your datastore performing? And why weren't you able to use a shapefile directly? Cheers Andrea ------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 _______________________________________________ Geoserver-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-devel
