Catalog event subsystem should protect itself from listeners throwing exceptions
--------------------------------------------------------------------------------
Key: GEOS-2840
URL: http://jira.codehaus.org/browse/GEOS-2840
Project: GeoServer
Issue Type: Bug
Components: Configuration
Reporter: Andrea Aime
Assignee: Andrea Aime
Fix For: 2.0.x
GWC listens to the catalog and throws runtime exceptions on occasion, such as:
{code}
Caused by: java.lang.NullPointerException
at org.geowebcache.layer.TileLayerDispatcher.update(TileLayerDispatcher.java:145)
at org.geoserver.gwc.GWCCatalogListener.handleModifyEvent(GWCCatalogListener.java:109)
at org.geoserver.catalog.impl.CatalogImpl.event(CatalogImpl.java:1271)
at org.geoserver.catalog.impl.CatalogImpl.fireModified(CatalogImpl.java:1247)
at org.geoserver.catalog.impl.CatalogImpl.saved(CatalogImpl.java:1226)
at org.geoserver.catalog.impl.CatalogImpl.save(CatalogImpl.java:377)
at org.geoserver.security.SecureCatalogImpl.save(SecureCatalogImpl.java:946)
at org.geoserver.web.data.ResourceConfigurationPage$4.onSubmit(ResourceConfigurationPage.java:118)
at org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1351)
at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:810)
... 69 more
{code}
The event firing code should log these exceptions but should not die, the code should protected itself from rogue listeners.
The fix is simple, add a try/catch inside the loop so that the code is protecetd and other listeners can still function (going to implement this now cause I cannot do much with GWC killing all my attempts at saving).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira