HI
I’m trying to upload a shapefile with REST API several times (to update the data of the feature type):
curl -u admin:geoserver -XPUT -H ‘Content-type: application/zip’ --data-binary @buildings.zip http://localhost:8080/geoserver/rest/workspaces/acme/datastores/buildings/file.shp
The first time works ok, but next time I get this exception:
19 ene 13:10:38 ERROR [geoserver.rest] -
org.geoserver.rest.RestletException: java.util.zip.ZipException: error in openin
g zip file
at org.geoserver.catalog.rest.StoreFileResource.handleFileUpload(StoreFi
leResource.java:99)
at org.geoserver.catalog.rest.DataStoreFileResource.handlePut(DataStoreF
ileResource.java:112)
at org.restlet.Finder.handle(Finder.java:298)
at org.geoserver.rest.BeanDelegatingRestlet.handle(BeanDelegatingRestlet
.java:38)
at org.restlet.Filter.doHandle(Filter.java:105)
at org.restlet.Filter.handle(Filter.java:134)
at org.restlet.Router.handle(Router.java:444)
I tried to delete the datastore, removing first the layer and the featuretype so later trying to upload the shapefile again. In this case sometimes it’s working but others getting the before error.
The problem seem that in the data directory the shapefile files are not deleted after the featuretype or datastore are deleted. If the files are deleted manually from the directory then works ok.
Not sure if I’m doing something wrong or it’s a bug of the REST API.
I’m using Windows Vista and Geoserver it’s not installed in Program Files folder.
Regards,
Jose Garcia
Sorry a lot this was not this list.
On Tue, Jan 19, 2010 at 1:24 PM, jose garcia <josegar74@anonymised.com> wrote:
HI
I’m trying to upload a shapefile with REST API several times (to update the data of the feature type):
curl -u admin:geoserver -XPUT -H ‘Content-type: application/zip’ --data-binary @buildings.zip http://localhost:8080/geoserver/rest/workspaces/acme/datastores/buildings/file.shp
The first time works ok, but next time I get this exception:
19 ene 13:10:38 ERROR [geoserver.rest] -
org.geoserver.rest.RestletException: java.util.zip.ZipException: error in openin
g zip file
at org.geoserver.catalog.rest.StoreFileResource.handleFileUpload(StoreFi
leResource.java:99)
at org.geoserver.catalog.rest.DataStoreFileResource.handlePut(DataStoreF
ileResource.java:112)
at org.restlet.Finder.handle(Finder.java:298)
at org.geoserver.rest.BeanDelegatingRestlet.handle(BeanDelegatingRestlet
.java:38)
at org.restlet.Filter.doHandle(Filter.java:105)
at org.restlet.Filter.handle(Filter.java:134)
at org.restlet.Router.handle(Router.java:444)
I tried to delete the datastore, removing first the layer and the featuretype so later trying to upload the shapefile again. In this case sometimes it’s working but others getting the before error.
The problem seem that in the data directory the shapefile files are not deleted after the featuretype or datastore are deleted. If the files are deleted manually from the directory then works ok.
Not sure if I’m doing something wrong or it’s a bug of the REST API.
I’m using Windows Vista and Geoserver it’s not installed in Program Files folder.
Regards,
Jose Garcia