I'm getting the error, Unable to delete resource referenced by layer, when trying to delete a layer using REST, what should I delete first ?
thank you On Thu, Oct 14, 2010 at 12:18 PM, David Winslow <dwins...@opengeo.org> wrote: > As far as I know there is not a way to do this in a single request. > However, if you want to avoid the "Unable to delete layer referenced by..." > error, you should be able to do so by deleting the layer at > rest/layers/<layername>.xml before deleting the featuretype. > A RESTConfig analogue to the recursive deletes in the UI would probably be a > nice addition if someone is interested in putting together a patch. > -- > David Winslow > OpenGeo - http://opengeo.org/ > > On Thu, Oct 14, 2010 at 7:18 AM, Shreerang Patwardhan > <patwardhan.shreer...@gmail.com> wrote: >> >> Hello Mckeane, >> >> This is exactly what I am looking for. I think you have replyed to >> my post as well. If anybody has a solution to this please keep me posted >> too. >> >> On Thu, Oct 14, 2010 at 2:11 AM, Mckeane <mckeane.tho...@gmail.com> wrote: >>> >>> Hello, >>> I was wondering if there is any way in which I could use curl/ rest >>> configuration to delete either datastore/coveragestore without deleting >>> the >>> layer/featuretypes first. >>> >>> I can delete the store from the geoservers UI, however I cannot using >>> curl/rest configuration. >>> >>> >>> [gr...@~/geoserver-2.0.2]$ curl -u admin:geoserver -v -XDELETE -H >>> 'Accept: >>> text/xml' >>> >>> http://localhost:9090/geoserver/rest/workspaces/icens/datastores/test1.xml >>> * About to connect() to localhost port 9090 (#0) >>> * Trying 127.0.0.1... connected >>> * Connected to localhost (127.0.0.1) port 9090 (#0) >>> * Server auth using Basic with user 'admin' >>> > DELETE /geoserver/rest/workspaces/icens/datastores/test1.xml HTTP/1.1 >>> > Authorization: Basic YWRtaW46Z2Vvc2VydmVy >>> > User-Agent: curl/7.16.4 (i386-redhat-linux-gnu) libcurl/7.16.4 >>> > OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.8 >>> > Host: localhost:9090 >>> > Accept: text/xml >>> > >>> < HTTP/1.1 403 Forbidden >>> < Transfer-Encoding: chunked >>> < Server: Jetty(6.1.8) >>> < >>> * Connection #0 to host localhost left intact >>> * Closing connection #0 >>> datastore not empty[gr...@~/geoserver-2.0.2]$ >>> >>> >>> Trying to delete the feature type: >>> >>> [gr...@~/geoserver-2.0.2]$ curl -u admin:geoserver -v -XDELETE -H >>> 'Accept: >>> text/xml' >>> >>> http://localhost:9090/geoserver/rest/workspaces/icens/datastores/test1/featuretypes/test1.xml >>> * About to connect() to localhost port 9090 (#0) >>> * Trying 127.0.0.1... connected >>> * Connected to localhost (127.0.0.1) port 9090 (#0) >>> * Server auth using Basic with user 'admin' >>> > DELETE >>> > >>> > /geoserver/rest/workspaces/icens/datastores/test1/featuretypes/test1.xml >>> > HTTP/1.1 >>> > Authorization: Basic YWRtaW46Z2Vvc2VydmVy >>> > User-Agent: curl/7.16.4 (i386-redhat-linux-gnu) libcurl/7.16.4 >>> > OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.8 >>> > Host: localhost:9090 >>> > Accept: text/xml >>> > >>> < HTTP/1.1 500 Internal Server Error >>> < Transfer-Encoding: chunked >>> < Server: Jetty(6.1.8) >>> < >>> * Connection #0 to host localhost left intact >>> * Closing connection #0 >>> :Unable to delete resource referenced by layer[gr...@~/geoserver-2.0.2]$ >>> -- >>> View this message in context: >>> http://old.nabble.com/Delete-a-datastore-coverage-store--in-Geoserver-tp29956746p29956746.html >>> Sent from the GeoServer - User mailing list archive at Nabble.com. >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Beautiful is writing same markup. Internet Explorer 9 supports >>> standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. >>> Spend less time writing and rewriting code and more time creating great >>> experiences on the web. Be a part of the beta today. >>> http://p.sf.net/sfu/beautyoftheweb >>> _______________________________________________ >>> Geoserver-users mailing list >>> Geoserver-users@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/geoserver-users >> >> >> >> -- >> Regards, >> Shreerang Patwardhan. >> https://sites.google.com/site/shreerangmohanpatwardhan/ >> >> >> ------------------------------------------------------------------------------ >> Beautiful is writing same markup. Internet Explorer 9 supports >> standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. >> Spend less time writing and rewriting code and more time creating great >> experiences on the web. Be a part of the beta today. >> http://p.sf.net/sfu/beautyoftheweb >> _______________________________________________ >> Geoserver-users mailing list >> Geoserver-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/geoserver-users >> > > > ------------------------------------------------------------------------------ > Beautiful is writing same markup. Internet Explorer 9 supports > standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. > Spend less time writing and rewriting code and more time creating great > experiences on the web. Be a part of the beta today. > http://p.sf.net/sfu/beautyoftheweb > _______________________________________________ > Geoserver-users mailing list > Geoserver-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/geoserver-users > > ------------------------------------------------------------------------------ Download new Adobe(R) Flash(R) Builder(TM) 4 The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly Flex(R) Builder(TM)) enable the development of rich applications that run across multiple browsers and platforms. Download your free trials today! http://p.sf.net/sfu/adobe-dev2dev _______________________________________________ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users