[Geoserver-devel] Cannot load shapefile into geoserver

Hi Justin

I’m having problems loading a shape file into geoserver. Attached please see the error / stack trace being generated when i try and create a new feature type from the data store that is giving errors.

thanks
Oliver

(attachments)

geoserverlog.txt (2.42 KB)

Hi Oliver,

It looks like the path to your shapefile is wrong.
With the default install of GeoServer, you will have your Geoserver directory, and in it, the 'conf' directory. In the conf directory you will have a 'data' directory. When you enter the url to your file, it starts relatively to the 'conf' directory.
So if your shapefile is located in Geoserver/conf/data/connector.shp, then the url will work.

Hope that helps,

Brent Owens
(The Open Planning Project)

Oliver Loe wrote:

Hi Justin

I'm having problems loading a shape file into geoserver. Attached please see the error / stack trace being generated when i try and create a new feature type from the data store that is giving errors.

thanks
Oliver
------------------------------------------------------------------------

java.io.IOException: File either doesn't exist or is unreadable : data\connector
.shp
        at org.geotools.data.shapefile.indexed.IndexedShapefileDataStore.getRead
Channel(IndexedShapefileDataStore.java:327)
        at org.geotools.data.shapefile.indexed.IndexedShapefileDataStore.openSha
peReader(IndexedShapefileDataStore.java:655)
        at org.geotools.data.shapefile.indexed.IndexedShapefileDataStore.readAtt
ributes(IndexedShapefileDataStore.java:905)
        at org.geotools.data.shapefile.indexed.IndexedShapefileDataStore.getSche
ma(IndexedShapefileDataStore.java:861)
        at org.geotools.data.shapefile.indexed.IndexedShapefileDataStore.getSche
ma(IndexedShapefileDataStore.java:855)
        at org.vfny.geoserver.action.data.DataFeatureTypesNewAction.execute(Data
FeatureTypesNewAction.java:86)
        at org.vfny.geoserver.action.ConfigAction.execute(ConfigAction.java:98)
        at org.apache.struts.action.RequestProcessor.processActionPerform(Reques
tProcessor.java:484)
        at org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
va:274)
        at org.apache.struts.action.ActionServlet.process(ActionServlet.java:148
2)
        at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:358
)
        at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicati
onHandler.java:294)
        at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:5
67)
        at org.mortbay.http.HttpContext.handle(HttpContext.java:1807)
        at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplication
Context.java:525)
        at org.mortbay.http.HttpContext.handle(HttpContext.java:1757)
        at org.mortbay.http.HttpServer.service(HttpServer.java:879)
        at org.mortbay.http.HttpConnection.service(HttpConnection.java:790)
        at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:961)
        at org.mortbay.http.HttpConnection.handle(HttpConnection.java:807)
        at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:
197)
        at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:276)
        at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:511)