Hi

I'm having issues trying to delete nested layer groups with mode Container
Tree in 2.13 and 2.14, with the UI and with the REST API. I have tested in
old version (2.9) and that is working fine.

I have created the following layer tree structure using *mode=Container
Tree *for the 2 layer groups:

GROUP_PARENT
  GROUP_CHILD
    LAYER1
    LAYER2

If I use the UI or REST API to delete GROUP_PARENT, it seems deleting both
GROUP_PARENT and GROUP_CHILD layer groups, but breaks GeoServer. For
example trying for example to delete the related workspace, fails with an
exception:

org.apache.wicket.WicketRuntimeException: Method onRequest of interface
org.apache.wicket.behavior.IBehaviorListener targeted at
org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink$1@5424443d on
component [AjaxSubmitLink [Component id = submit]] threw an exception at
org.apache.wicket.RequestListenerInterface.internalInvoke(RequestListenerInterface.java:268)
at
org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:241)
at
org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.invokeListener(ListenerInterfaceRequestHandler.java:248)
at
org.apache.wicket.core.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:234)
at
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:895)
at
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)
at
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:265)
at
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:222)
at
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:293)
at
org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:261)
at org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter

It requires to restart GeoServer. After the restart in the layer groups
GROUP_CHILD is listed again, seem was not really removed.

*With** the REST API*, I've checked to delete first GROUP_CHILD and after
GROUP_PARENT, but I get the following error:

Unable to delete layer group referenced by layer group 'GROUP_PARENT'

If I try to update the GROUP_PARENT to empty it, I get this other error:

Layer group must not be empty


*With the UI*, if I try to delete the GROUP_CHILD then in the confirm
dialog it indicates that GROUP_PARENT is going to be updated and the it
works fine, deleting GROUP_CHILD and GROUP_PARENT.


So in summary, for  layer groups  mode Container Tree, at least since 2.13:

- Deleting the parent group layer with nested groups "seem to work" from
the UI and REST API as no errors are returned, but leaves GeoServer in a
bad status requiring to restart it. If this is not allowed should be
prevented with a proper error or message to the user.

- Deleting the child layer group works from the UI and seem handling the
removal of the parent layer group if empty.

- The previous case from REST API seem not possible as to delete a child
group, need to remove it from the parent, but the parent can't be emptied.


Not sure if I'm doing this wrongly or if there's any workaround to be able
to delete nested layer groups with mode Container Tree with the REST API?


I have found this issue that could be related, but is closed:
https://osgeo-org.atlassian.net/browse/GEOS-7858


Thanks and regards,
Jose GarcĂ­a
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to