[Geoserver-devel] [JIRA] (GEOS-7086) GeoServer REST: namespace is deleted, but associated workspace is not

Stefano Costa created an issue

GeoServer / BugGEOS-7086

GeoServer REST: namespace is deleted, but associated workspace is not

Issue Type:

BugBug

Affects Versions:

2.8.0

Assignee:

Unassigned

Components:

REST

Created:

24/Jun/15 12:02 PM

Environment:

Linux Fedora 22 64-bit
OpenJDK 1.8.0_45
GeoServer 2.8-SNAPSHOT

Priority:

MediumMedium

Reporter:

Stefano Costa

When a namespace is created issuing a POST request to the /namespaces endpoint, a corresponding workspace is automatically created by GeoServer.

Conversely, when a namespace is deleted issuing a DELETE request to the /namespaces/<ns> endpoint, the associated workspace is not explictly removed from the catalog (I checked the code in NamespaceResource) and continues to appear in the UI (a NullPointerException is thrown if user clicks on it) and in the outcome of REST calls, even though the workspace.xml file no longer exists on disk.

If GeoServer is rebooted, the workspace disappears.

cURL requests to reproduce the issue:

curl -X POST -d '<namespace><prefix>test_ns</prefix><uri>http://www.exmple.com</uri></namespace>' -H "Content-Type: text/xml" -u admin:geoserver http://localhost:8080/geoserver/rest/namespaces

curl -X DELETE -u admin:geoserver http://localhost:8080/geoserver/rest/namespaces/test_ns

Proposed fix is here:
https://github.com/geoserver/geoserver/pull/1119

Add Comment

Add Comment

This message was sent by Atlassian JIRA (v6.5-OD-07-005#65007-sha1:7561251)

Atlassian logo