Still testing on this in the hope to get the problem. Since it seems related to multithreading that is done inside geotools, I would like to force single threading to see if it works.
I assume I can push that through the reading parameters I pass to the reader. Here is how I pass the gridgeometry to read: GeneralParameterValue[] readParams = new GeneralParameterValue[1]; Parameter<GridGeometry2D> readGG = new Parameter<GridGeometry2D>(AbstractGridFormat.READ_GRIDGEOMETRY2D); GridEnvelope2D gridEnvelope = new GridEnvelope2D(0, 0, width, height); Envelope env; if (crs != null) { env = new ReferencedEnvelope(west, east, south, north, crs); } else { DirectPosition2D minDp = new DirectPosition2D(west, south); DirectPosition2D maxDp = new DirectPosition2D(east, north); env = new Envelope2D(minDp, maxDp); } readGG.setValue(new GridGeometry2D(gridEnvelope, env)); readParams[0] = readGG; I assume I have to add a second one with a connection to: ImageMosaicFormat.ALLOW_MULTITHREADING Up to know I have not been able to understand how I can do this. Does anyone have a quick hint. Thanks, Andrea On Thu, Mar 20, 2014 at 7:49 AM, Jody Garnett <jody.garn...@gmail.com> wrote: > Yeah I understand about not opening a random bug report seems a bit bayesian > for software development. > > Can you add (or enable) some more logging in order to try and get a fix on > things? > > > Jody Garnett > > > On Tue, Mar 18, 2014 at 11:09 PM, andrea antonello > <andrea.antone...@gmail.com> wrote: >> >> Hi Jody, >> >> > Since you have not gotten a response I expect a bug report is called >> > for. >> > >> > "Apparently random" errors are difficult to find, are you using the code >> > in >> > a multithreaded environment at all? >> >> nope, it is accessed in single thread mode. >> >> I was hoping someone would experience similar issues and comparing we >> would find "something". >> >> I am not all that keen to open a bug report with random stuff in it. >> Those usually stay stale and are of really no use. >> If I come up with something that makes sense and can be reproduced, I >> will sure open a report. >> >> Cheers, >> Andrea >> >> >> >> >> > >> > Jody Garnett >> > >> > >> > On Tue, Mar 11, 2014 at 12:52 AM, andrea antonello >> > <andrea.antone...@gmail.com> wrote: >> >> >> >> Hi all, >> >> I am having an apparently random error when reading rasters from >> >> ImageMosaic. >> >> It doesn't happen when debugging inside eclipse, so I have no idea >> >> what is going on, apart of the fact that sometimes null goes into the >> >> operation instead of the source. >> >> It then happens from time to time when running in normal mode and from >> >> outside eclipse. >> >> >> >> I tried this on linux with >> >> java version "1.6.0_14" >> >> Java(TM) SE Runtime Environment (build 1.6.0_14-b08) >> >> Java HotSpot(TM) 64-Bit Server VM (build 14.0-b16, mixed mode) >> >> >> >> Looking at the below the stacktrace, has anyone an idea what I could >> >> try to get to a solution? >> >> >> >> Thanks, >> >> Andrea >> >> >> >> ---------------------------- >> >> >> >> Error: One factory fails for the operation "Scale" >> >> Occurs in: javax.media.jai.ThreadSafeOperationRegistry >> >> java.lang.reflect.InvocationTargetException >> >> at sun.reflect.GeneratedMethodAccessor39.invoke(Unknown Source) >> >> at >> >> >> >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >> >> at java.lang.reflect.Method.invoke(Method.java:597) >> >> 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.getColorModel(RenderedOp.java:2242) >> >> at >> >> >> >> org.geotools.gce.imagemosaic.RasterLayerResponse$GranuleCollector.collectGranules(RasterLayerResponse.java:433) >> >> at >> >> >> >> org.geotools.gce.imagemosaic.RasterLayerResponse$GranuleCollector.access$2500(RasterLayerResponse.java:300) >> >> at >> >> >> >> org.geotools.gce.imagemosaic.RasterLayerResponse$MosaicProducer.produce(RasterLayerResponse.java:970) >> >> at >> >> >> >> org.geotools.gce.imagemosaic.RasterLayerResponse$MosaicProducer.access$3200(RasterLayerResponse.java:789) >> >> at >> >> >> >> org.geotools.gce.imagemosaic.RasterLayerResponse.prepareResponse(RasterLayerResponse.java:1235) >> >> at >> >> >> >> org.geotools.gce.imagemosaic.RasterLayerResponse.processRequest(RasterLayerResponse.java:1125) >> >> at >> >> >> >> org.geotools.gce.imagemosaic.RasterLayerResponse.createResponse(RasterLayerResponse.java:1091) >> >> at >> >> >> >> org.geotools.gce.imagemosaic.RasterManager.read(RasterManager.java:1108) >> >> at >> >> >> >> org.geotools.gce.imagemosaic.ImageMosaicReader.read(ImageMosaicReader.java:611) >> >> at >> >> >> >> org.geotools.gce.imagemosaic.ImageMosaicReader.read(ImageMosaicReader.java:590) >> >> at >> >> >> >> org.geotools.gce.imagemosaic.ImageMosaicReader.read(ImageMosaicReader.java:524) >> >> at >> >> >> >> org.jgrasstools.gears.libs.modules.JGTModelIM.processGeometryByTileCell(JGTModelIM.java:227) >> >> at >> >> >> >> org.jgrasstools.gears.libs.modules.JGTModelIM.processByTileCells(JGTModelIM.java:163) >> >> at >> >> >> >> org.jgrasstools.hortonmachine.modules.geomorphology.gradient.OmsGradientIM.process(OmsGradientIM.java:93) >> >> at >> >> org.jgrasstools.oceandtm.ODTM03b_Slope.process(ODTM03b_Slope.java:78) >> >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> >> at >> >> >> >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >> >> at >> >> >> >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >> >> at java.lang.reflect.Method.invoke(Method.java:597) >> >> 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) >> >> ... 40 more >> >> >> >> >> >> >> >> ------------------------------------------------------------------------------ >> >> Learn Graph Databases - Download FREE O'Reilly Book >> >> "Graph Databases" is the definitive new guide to graph databases and >> >> their >> >> applications. Written by three acclaimed leaders in the field, >> >> this first edition is now available. Download your free book today! >> >> http://p.sf.net/sfu/13534_NeoTech >> >> _______________________________________________ >> >> GeoTools-GT2-Users mailing list >> >> GeoTools-GT2-Users@lists.sourceforge.net >> >> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users >> > >> > >> >> >> ------------------------------------------------------------------------------ >> Learn Graph Databases - Download FREE O'Reilly Book >> "Graph Databases" is the definitive new guide to graph databases and their >> applications. Written by three acclaimed leaders in the field, >> this first edition is now available. Download your free book today! >> http://p.sf.net/sfu/13534_NeoTech >> _______________________________________________ >> GeoTools-GT2-Users mailing list >> GeoTools-GT2-Users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users > > ------------------------------------------------------------------------------ Put Bad Developers to Shame Dominate Development with Jenkins Continuous Integration Continuously Automate Build, Test & Deployment Start a new project now. Try Jenkins in the cloud. http://p.sf.net/sfu/13600_Cloudbees _______________________________________________ GeoTools-GT2-Users mailing list GeoTools-GT2-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users