[Geoserver-devel] [JIRA] (GEOS-7857) Cascade Delete fails for a layer group contained within another layer group

Torben Barsballe created an issue

GeoServer / ImprovementGEOS-7857

Cascade Delete fails for a layer group contained within another layer group

Issue Type:

ImprovementImprovement

Assignee:

Unassigned

Created:

16/Nov/16 7:39 PM

Priority:

MediumMedium

Reporter:

Torben Barsballe

If you try to apply a CascadeDeleteVisitor to a layer group that is itself contained within another layer group, you will get the following error:

java.lang.IllegalArgumentException: Layer group has different number of styles than layers

	at org.geoserver.catalog.impl.CatalogImpl.validate(CatalogImpl.java:845)
	at org.geoserver.catalog.impl.CatalogImpl.save(CatalogImpl.java:938)
	at org.geoserver.security.SecureCatalogImpl.save(SecureCatalogImpl.java:1315)
	at org.geoserver.catalog.impl.AbstractFilteredCatalog.save(AbstractFilteredCatalog.java:740)
	at org.geoserver.catalog.impl.AbstractCatalogDecorator.save(AbstractCatalogDecorator.java:446)
	at org.geoserver.catalog.impl.LocalWorkspaceCatalog.save(LocalWorkspaceCatalog.java:218)
	at org.geoserver.catalog.CascadeDeleteVisitor.visit(CascadeDeleteVisitor.java:273)
        ...

Additionally, if you try to apply the CascadeDeleteVisitor to a store or workspace, when there is a global layer group containing only layers from that store/workspace and other layer groups containing such layers, the nested layer groups will not be removed properly, and you will wind up with empty layer groups that do not get automatically removed by the visitor.

Add Comment

Add Comment

This message was sent by Atlassian JIRA (v1000.552.1#100018-sha1:c06db68)

Atlassian logo