When using ImageMosaic with index stored in database (PostGIS 2.2) GetCapabilities-document breaks if the index is empty (I add and remove granules using REST Api). This also happens if some of the rows in the index has faulty values or if the cell is empty.
I have a dataset stored in the ImageMosic, with two time dimensions (time and reference_time). It seems that geoserver tries to read the empty values and parse them as dates.
GetCapabilities shows only following if there is something wrong with the index:
This page contains the following errors:error on line 6194 at column 4370: XML declaration allowed only at the start of the documentBelow is a rendering of the page up to the first error.
Faulty index should not probably break the whole getCapabilities, maybe just remove the faulty layers from document? Or just ignore the faulty granule in the document?
Stack Trace attached.