A NullPointerException occurs for GridCoverageRenderer.renderImage() when symbolizerGC is null but tries to call getRenderedImage(). It seems a check or try statement should be added to handle the symbolizerGC null case. The error was encountered when the coverage was outside the area of interest coordinates. While debugging, I forced renderImage() to return null when symbolizerGC was null and it seemed to resolve the problem. Stacktrace: java.lang.NullPointerException at org.geotools.renderer.lite.gridcoverage2d.GridCoverageRenderer.renderImage(GridCoverageRenderer.java:394) at org.geotools.renderer.lite.gridcoverage2d.GridCoverageRenderer.paint(GridCoverageRenderer.java:1128) at org.geotools.renderer.lite.gridcoverage2d.GridCoverageRenderer.paint(GridCoverageRenderer.java:1090) at org.geotools.renderer.lite.StreamingRenderer$RenderRasterRequest.execute(StreamingRenderer.java:3330) at org.geotools.renderer.lite.StreamingRenderer$PainterThread.run(StreamingRenderer.java:3503) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) |