We're updating the issue view to help you get more done. 

GeoServer tiled layer are not loaded due Spring beans cyclic dependencies, GWC integration deletes the layer configurations as a result

Description

WMS and LegendSample beans used in GeoServerTileLayer may provoke a cyclic dependency when Spring beans are loaded, as a consequence tiled layers may not be loaded and are delete by GWC integration.

The full satcktrace is available as an attachment of this issue, the most important part is this one:

1 20 Sep 11:51:58 ERROR [gwc.layer] - GeoServer TileLayer named 'test:watertemp' with id 'LayerInfoImpl-3c021fdc:1573d915ea1:-7fed' can't be loaded. It will be removed from the configuration but you'll need to delete its cache manually (if any). Original error message: Error creating bean with name 'wms' defined in URL [file:/home/nuno/github/geoserver/src/wms/target/classes/applicationContext.xml]: Cannot resolve reference to bean 'geoServer' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'geoServer' defined in URL [file:/home/nuno/github/geoserver/src/main/target/classes/applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'gwcInitializer' defined in URL [file:/home/nuno/github/geoserver/src/gwc/target/classes/applicationContext.xml]: Cannot resolve reference to bean 'gwcConfigBlobStore' while setting bean property 'blobStore'; nested exception is org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'gwcConfigBlobStore': Requested bean is currently in creation: Is there an unresolvable circular reference?

The important (and scary) part being "GeoServer TileLayer named 'test:watertemp' with id 'LayerInfoImpl-3c021fdc:1573d915ea1:-7fed' can't be loaded. It will be removed from the configuration but you'll need to delete its cache manually (if any)"

Environment

None

Status

Assignee

Nuno Oliveira

Reporter

Nuno Oliveira

Triage

None

Fix versions

Affects versions

None

Components

Priority

Highest