I have a NetCDF ImageMosaic that’s working on geoserver 2.27.2. When upgrading to 2.28, doing a WCS GetCoverage on it returns this error:
Cannot invoke &quot;org.eclipse.imagen.ImageLayout.getSampleModel(java.awt.image.RenderedImage)&quot; because &quot;this.layout&quot; is null</ows:ExceptionText>
and writes this in the logs:
2025-11-03T10:13:47.728Z WARN [gce.imagemosaic] - Unable to parse sample image for path /data/geoserver/coverages/emodnet_biology/cal_fin/cal_fin_19582016_L1sample_image.dat
java.lang.ClassNotFoundException: com.sun.media.jai.codecimpl.util.FloatDoubleColorModel
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:467)
at org.geotools.gce.imagemosaic.RemappingFilteringObjectInputStream.load(RemappingFilteringObjectInputStream.java:94)
at org.geotools.gce.imagemosaic.RemappingFilteringObjectInputStream.resolveClass(RemappingFilteringObjectInputStream.java:140)
at java.base/java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:2034)
at java.base/java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1898)
025-11-03T10:13:47.728Z WARN [gce.imagemosaic] - Unable to find sample image for path file:/data/geoserver/coverages/emodnet_biology/cal_fin/datastore.properties
It seems the coverages have a few files *sample_image.dat, containing a serialized object. As 2.28 has changed the JAI implementation, these objects can’t deserialize anymore. I presume geoserver’s RemappingFilteringObjectInputStream tries to translate these to new classes, but this one is not translated (and I haven’t yet found its successor).
I have unfortunately no knowledge about how these files were created originally. I tried deleting them, but geoserver does not recreate them. There seems to be code in geoserver to rebuild it, but I don’t manage to trigger it without damaging other metadata.