While accessing my geoserver from multiple threads I get the stacktrace below. I can't reproduce it systematically, so the only explanation I have is that the EnhancedRandomAccessFile is being accessed from multiple threads.
We'll need to add some kind of locking, if we want to make this thread safe. In my personal setup, I don't have NetCDF files with a lot of dimensions, so I'm going to evaluate if I can leave disable the indexmanager entirely. I should also note that the Unidata NetCDF library has a cache of open files. So wouldn't that be a better way to speed up access to NetCDF files with a high number of coverages?
at org.geotools.renderer.lite.RenderingTransformationHelper.applyRenderingTransformation(RenderingTransformationHelper.java:141) at org.geoserver.wms.map.RenderedImageMapOutputFormat.directRasterRender(RenderedImageMapOutputFormat.java:919) ... 105 more Caused by: java.io.IOException: Problem with featureCollection visiting NIR/TOC__/PROBAV_S1_TOC_X12Y10_20141208_333M_V001.HDF5NIR_TOC.ncml:java.lang.NegativeArraySizeException at org.geotools.data.DataUtilities.visit(DataUtilities.java:2823) at org.geotools.data.store.DataFeatureCollection.accepts(DataFeatureCollection.java:457) at org.geotools.gce.imagemosaic.catalog.CachingDataStoreGranuleCatalog.getGranuleDescriptors(CachingDataStoreGranuleCatalog.java:158) at org.geotools.gce.imagemosaic.RasterManager.getGranuleDescriptors(RasterManager.java:1153) at org.geotools.gce.imagemosaic.RasterLayerResponse.prepareResponse(RasterLayerResponse.java:1339) ... 118 more Caused by: java.lang.NegativeArraySizeException at org.geotools.imageio.netcdf.Slice2DIndex$Slice2DIndexManager.getSlice2DIndex(Slice2DIndex.java:162) at org.geotools.imageio.netcdf.AncillaryFileManager.getSlice2DIndex(AncillaryFileManager.java:354) at org.geotools.imageio.netcdf.NetCDFImageReader.getSlice2DIndex(NetCDFImageReader.java:628) at org.geotools.imageio.netcdf.NetCDFImageReader.getCoverageDescriptor(NetCDFImageReader.java:639) at org.geotools.imageio.netcdf.NetCDFImageReader.getWidth(NetCDFImageReader.java:220) at org.geotools.gce.imagemosaic.Utils.getDimension(Utils.java:753) at org.geotools.gce.imagemosaic.GranuleDescriptor.init(GranuleDescriptor.java:349) at org.geotools.gce.imagemosaic.GranuleDescriptor.<init>(GranuleDescriptor.java:614) at org.geotools.gce.imagemosaic.catalog.CachingDataStoreGranuleCatalog$1.visit(CachingDataStoreGranuleCatalog.java:175) at org.geotools.data.DataUtilities.visit(DataUtilities.java:2816)
|