|
I am experiencing an exception in reading gridcoverages as parts of an imagemosaic.
Not sure what the reason is, but here is what I came up with up to now.
The error is:
Error: One factory fails for the operation "Scale" Occurs in: javax.media.jai.ThreadSafeOperationRegistry
Full trace is:
java.lang.reflect.InvocationTargetException at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at javax.media.jai.FactoryCache.invoke(FactoryCache.java:122) at javax.media.jai.OperationRegistry.invokeFactory(OperationRegistry.java:1674) at javax.media.jai.ThreadSafeOperationRegistry.invokeFactory(ThreadSafeOperationRegistry.java:473) at javax.media.jai.registry.RIFRegistry.create(RIFRegistry.java:332) at javax.media.jai.RenderedOp.createInstance(RenderedOp.java:819) at javax.media.jai.RenderedOp.createRendering(RenderedOp.java:867) at javax.media.jai.RenderedOp.getRendering(RenderedOp.java:888) at javax.media.jai.RenderedOp$1.getPropertyNames(RenderedOp.java:1791) at javax.media.jai.PropertyEnvironment.mapDefaults(PropertyEnvironment.java:270) at javax.media.jai.PropertyEnvironment.getPropertyNames(PropertyEnvironment.java:125) at javax.media.jai.WritablePropertySourceImpl.addProperties(WritablePropertySourceImpl.java:298) at javax.media.jai.RenderedOp.createPropertySource(RenderedOp.java:1817) at javax.media.jai.RenderedOp.getProperty(RenderedOp.java:1968) at org.geotools.gce.imagemosaic.GranuleDescriptor$GranuleLoadingResult.<init>(GranuleDescriptor.java:257) at org.geotools.gce.imagemosaic.GranuleDescriptor.loadRaster(GranuleDescriptor.java:939) at org.geotools.gce.imagemosaic.GranuleLoader.call(GranuleLoader.java:110) at org.geotools.gce.imagemosaic.GranuleLoader.call(GranuleLoader.java:41) at java.util.concurrent.FutureTask.run(Unknown Source) at org.geotools.gce.imagemosaic.RasterLayerResponse$GranuleCollector.accept(RasterLayerResponse.java:406) at org.geotools.gce.imagemosaic.RasterLayerResponse$GranuleCollector.access$2200(RasterLayerResponse.java:340) at org.geotools.gce.imagemosaic.RasterLayerResponse$MosaicProducer.visit(RasterLayerResponse.java:1017) at org.geotools.gce.imagemosaic.catalog.CachingDataStoreGranuleCatalog$1.visit(CachingDataStoreGranuleCatalog.java:192) at org.geotools.data.store.ContentFeatureSource.accepts(ContentFeatureSource.java:696) at org.geotools.data.store.ContentFeatureCollection.accepts(ContentFeatureCollection.java:121) at org.geotools.gce.imagemosaic.catalog.CachingDataStoreGranuleCatalog.getGranuleDescriptors(CachingDataStoreGranuleCatalog.java:158) at org.geotools.gce.imagemosaic.RasterManager.getGranuleDescriptors(RasterManager.java:1135) at org.geotools.gce.imagemosaic.RasterLayerResponse.prepareResponse(RasterLayerResponse.java:1336) at org.geotools.gce.imagemosaic.RasterLayerResponse.processRequest(RasterLayerResponse.java:1228) at org.geotools.gce.imagemosaic.RasterLayerResponse.createResponse(RasterLayerResponse.java:1194) at org.geotools.gce.imagemosaic.RasterManager.read(RasterManager.java:1125) at org.geotools.gce.imagemosaic.ImageMosaicReader.read(ImageMosaicReader.java:629) at org.geotools.gce.imagemosaic.ImageMosaicReader.read(ImageMosaicReader.java:608) at org.geotools.gce.imagemosaic.ImageMosaicReader.read(ImageMosaicReader.java:542) at org.jgrasstools.gears.libs.modules.JGTModelIM.processGeometryByTileCell(JGTModelIM.java:229) at org.jgrasstools.gears.libs.modules.JGTModelIM.processByTileCells(JGTModelIM.java:164) at org.jgrasstools.hortonmachine.modules.geomorphology.curvatures.OmsCurvaturesIM.process(OmsCurvaturesIM.java:99) at org.jgrasstools.oceandtm.ODTM03c_Curvatures.process(ODTM03c_Curvatures.java:78) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:229) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:52) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:121) at Script1.run(Script1.groovy:6) at groovy.lang.GroovyShell.evaluate(GroovyShell.java:576) at groovy.lang.GroovyShell.evaluate(GroovyShell.java:614) at groovy.lang.GroovyShell.evaluate(GroovyShell.java:585) at oms3.CLI.createSim(CLI.java:136) at oms3.CLI.main(CLI.java:218) Caused by: java.lang.NullPointerException at javax.media.jai.GeometricOpImage.<init>(GeometricOpImage.java:280) at javax.media.jai.ScaleOpImage.<init>(ScaleOpImage.java:427) at com.sun.media.jai.opimage.ScaleNearestOpImage.<init>(ScaleNearestOpImage.java:64) at com.sun.media.jai.opimage.ScaleCRIF.create(ScaleCRIF.java:126) ... 55 more
Loading the jai-core source, I noticed that the NPE is due to the fact that in GeometricOpImage the call on
int numBands = getSampleModel().getNumBands();
fails because the SampleModel is missing.
Have not been able to understand why.
|