Hi,
I was looking into this one
http://jira.codehaus.org/browse/GEOS-6320
and it seems to me the issue can be caused by a group whose layers have
been removed from the configuration manually (e.g., deleted from disk): if you reload
the configuration after that, the layer references are ResovingProxy, and they will
return a null if the layer they point to is not more there, causing the above configuration
to be saved.
Now, my first take on this one is to sanitize the layer list in the “resolve” method, and if
missing, clear them:
https://github.com/geoserver/geoserver/pull/477
This should fix the issue if the layer group has been already saved on disk like Mauro
reported, but I guess it won’t help if the ResolvingProxy is still around…
I guess a different take would be to modify resolve(LayerGroupInfo layerGroup)
in DefaultCatalogFacade, but this would make it facade dependent (e.g., this would not
work in the jdbc config)
Or a separate method in CatalogImpl could be used to sanitize these configuration issues,
to be used after the object has been added to the facade.
Mind, this is not the only issue we have with dangling references, this one is also
a headache, which is caused by layers that have lost the default style they referenced to.
http://jira.codehaus.org/browse/GEOS-6318
So… it would be nice to have some general mechanism to handle these dangling references
in a way that still allows GeoServer to start up, and the config objects in question to
be fixed enough to make them usable in the config UI.
Suggestions?
Cheers
Andrea
–
== Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information ==
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it