[Geoserver-users] Need help: ImageMosaic and GeoTIFFs - finishes with java.lang.NullPointerException

Hello!

The problem is I can create mosaic form GeoTIFFs, but it can't be displayed.
And the problem can be reproduced at a small project.

What I have:
1) GeoServer 1.7.4 on win32;

2) example 'mosaic_sample' works OK;

3) some GeoTIFFs, created from a larger one (a two images is a minimum
:slight_smile: when problem re-creates);

4) the GeoTIFFs itself can be obtained via WMS without problem if
configure them as a stand-alone rasters;

5) I can create new mosaic (with this RTFM
http://geoserver.org/display/GEOSDOC/Using+the+ImageMosaic+plugin )

6) attempt to display that mosaic as map demo finishes in such error
(and nothing is displayed at all):
-----
2009-06-08 16:06:07,233 ERROR [geotools.rendering] -
java.lang.NullPointerException
        at org.geotools.gce.imagemosaic.RasterLayerRequest.getRequestedResolution(RasterLayerRequest.java:929)
        at org.geotools.gce.imagemosaic.RasterManager$DecimationController.performDecimation(RasterManager.java:347)
        at org.geotools.gce.imagemosaic.RasterLayerResponse.setReadParams(RasterLayerResponse.java:842)
        at org.geotools.gce.imagemosaic.RasterLayerResponse.assembleGranules(RasterLayerResponse.java:537)
        at org.geotools.gce.imagemosaic.RasterLayerResponse.createCoverage(RasterLayerResponse.java:469)
        at org.geotools.gce.imagemosaic.RasterLayerResponse.createResponse(RasterLayerResponse.java:435)
        at org.geotools.gce.imagemosaic.RasterManager.read(RasterManager.java:595)
        at org.geotools.gce.imagemosaic.ImageMosaicReader.read(ImageMosaicReader.java:421)
        at org.geotools.renderer.lite.StreamingRenderer.renderRaster(StreamingRenderer.java:1994)
        at org.geotools.renderer.lite.StreamingRenderer.processSymbolizers(StreamingRenderer.java:1878)
        at org.geotools.renderer.lite.StreamingRenderer.process(StreamingRenderer.java:1824)
        at org.geotools.renderer.lite.StreamingRenderer.drawOptimized(StreamingRenderer.java:1766)
        at org.geotools.renderer.lite.StreamingRenderer.processStylers(StreamingRenderer.java:1681)
        at org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.java:679)
        at org.geotools.renderer.shape.ShapefileRenderer.renderWithStreamingRenderer(ShapefileRenderer.java:1475)
        at org.geotools.renderer.shape.ShapefileRenderer.paint(ShapefileRenderer.java:1344)
        at org.geotools.renderer.shape.ShapefileRenderer.paint(ShapefileRenderer.java:265)
        at org.vfny.geoserver.wms.responses.DefaultRasterMapProducer.produceMap(DefaultRasterMapProducer.java:372)
        at org.vfny.geoserver.wms.responses.GetMapResponse.execute(GetMapResponse.java:415)
        at org.geoserver.ows.adapters.ResponseAdapter.getMimeType(ResponseAdapter.java:48)
        at org.geoserver.ows.Dispatcher.response(Dispatcher.java:699)
        at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:216)
        at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
[...]
-----

dixi
--
LinkedIn: http://www.linkedin.com/pub/aleksey-smirnov/13/598/3b3

Raja Kajiev ha scritto:

Hello!

The problem is I can create mosaic form GeoTIFFs, but it can't be displayed.
And the problem can be reproduced at a small project.

What I have:
1) GeoServer 1.7.4 on win32;

2) example 'mosaic_sample' works OK;

3) some GeoTIFFs, created from a larger one (a two images is a minimum
:slight_smile: when problem re-creates);

4) the GeoTIFFs itself can be obtained via WMS without problem if
configure them as a stand-alone rasters;

5) I can create new mosaic (with this RTFM
http://geoserver.org/display/GEOSDOC/Using+the+ImageMosaic+plugin )

6) attempt to display that mosaic as map demo finishes in such error
(and nothing is displayed at all):
-----
2009-06-08 16:06:07,233 ERROR [geotools.rendering] -
java.lang.NullPointerException
        at org.geotools.gce.imagemosaic.RasterLayerRequest.getRequestedResolution(RasterLayerRequest.java:929)

Looking into the code I see this has been changed after the 1.7.4
release, and probably this issue has been fixed.
Can you try out a nightly build here:
http://gridlock.openplans.org/geoserver/1.7.x/

And see if that works for you?
Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

Ciao,
as Andrea pointed out this problems has already been fixed, please try
one of the latest nightly builds.

I have to update the mosaic tutorial, but a quick advice is to just
point the mosaic plugin to the directory where your files reside. It
should build the index transparently by itself.

Simone.
-------------------------------------------------------
Ing. Simone Giannecchini
GeoSolutions S.A.S.
Owner - Software Engineer
Via Carignoni 51
55041 Camaiore (LU)
Italy

phone: +39 0584983027
fax: +39 0584983027
mob: +39 333 8128928

http://www.geo-solutions.it
http://simboss.blogspot.com/
http://www.linkedin.com/in/simonegiannecchini

-------------------------------------------------------

On Mon, Jun 8, 2009 at 3:02 PM, Raja Kajiev<raja.kajiev@anonymised.com> wrote:

Hello!

The problem is I can create mosaic form GeoTIFFs, but it can't be displayed.
And the problem can be reproduced at a small project.

What I have:
1) GeoServer 1.7.4 on win32;

2) example 'mosaic_sample' works OK;

3) some GeoTIFFs, created from a larger one (a two images is a minimum
:slight_smile: when problem re-creates);

4) the GeoTIFFs itself can be obtained via WMS without problem if
configure them as a stand-alone rasters;

5) I can create new mosaic (with this RTFM
http://geoserver.org/display/GEOSDOC/Using+the+ImageMosaic+plugin )

6) attempt to display that mosaic as map demo finishes in such error
(and nothing is displayed at all):
-----
2009-06-08 16:06:07,233 ERROR [geotools.rendering] -
java.lang.NullPointerException
at org.geotools.gce.imagemosaic.RasterLayerRequest.getRequestedResolution(RasterLayerRequest.java:929)
at org.geotools.gce.imagemosaic.RasterManager$DecimationController.performDecimation(RasterManager.java:347)
at org.geotools.gce.imagemosaic.RasterLayerResponse.setReadParams(RasterLayerResponse.java:842)
at org.geotools.gce.imagemosaic.RasterLayerResponse.assembleGranules(RasterLayerResponse.java:537)
at org.geotools.gce.imagemosaic.RasterLayerResponse.createCoverage(RasterLayerResponse.java:469)
at org.geotools.gce.imagemosaic.RasterLayerResponse.createResponse(RasterLayerResponse.java:435)
at org.geotools.gce.imagemosaic.RasterManager.read(RasterManager.java:595)
at org.geotools.gce.imagemosaic.ImageMosaicReader.read(ImageMosaicReader.java:421)
at org.geotools.renderer.lite.StreamingRenderer.renderRaster(StreamingRenderer.java:1994)
at org.geotools.renderer.lite.StreamingRenderer.processSymbolizers(StreamingRenderer.java:1878)
at org.geotools.renderer.lite.StreamingRenderer.process(StreamingRenderer.java:1824)
at org.geotools.renderer.lite.StreamingRenderer.drawOptimized(StreamingRenderer.java:1766)
at org.geotools.renderer.lite.StreamingRenderer.processStylers(StreamingRenderer.java:1681)
at org.geotools.renderer.lite.StreamingRenderer.paint(StreamingRenderer.java:679)
at org.geotools.renderer.shape.ShapefileRenderer.renderWithStreamingRenderer(ShapefileRenderer.java:1475)
at org.geotools.renderer.shape.ShapefileRenderer.paint(ShapefileRenderer.java:1344)
at org.geotools.renderer.shape.ShapefileRenderer.paint(ShapefileRenderer.java:265)
at org.vfny.geoserver.wms.responses.DefaultRasterMapProducer.produceMap(DefaultRasterMapProducer.java:372)
at org.vfny.geoserver.wms.responses.GetMapResponse.execute(GetMapResponse.java:415)
at org.geoserver.ows.adapters.ResponseAdapter.getMimeType(ResponseAdapter.java:48)
at org.geoserver.ows.Dispatcher.response(Dispatcher.java:699)
at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:216)
at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
[...]
-----

dixi
--
LinkedIn: http://www.linkedin.com/pub/aleksey-smirnov/13/598/3b3

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Not sure, but looks like actually I run into this issue:
http://geoserver.org/display/GEOSDOC/ImageMosaic+sometimes+not+showing+tiles
i.e. changing WKT desription in mosaic .prj-file solved problem.

Thnx for the link to nightly builds storage anyway - gonna check'em too.

dixi

2009/6/8 Simone Giannecchini <simone.giannecchini@anonymised.com>:

Ciao,
as Andrea pointed out this problems has already been fixed, please try
one of the latest nightly builds.

I have to update the mosaic tutorial, but a quick advice is to just
point the mosaic plugin to the directory where your files reside. It
should build the index transparently by itself.

--
LinkedIn: http://www.linkedin.com/pub/aleksey-smirnov/13/598/3b3

Checked 060909 build, got the same error when WKT definition in
shp-file differs from definition in GeoServer's epsg.properties.
I can send the data sample or test another build if you can/want to
investigate this problem.

BTW, can you help me with what the "point the mosaic plugin to the
directory where your files reside" exactly mean? What and where should
I tweak?

dixi

2009/6/8 Simone Giannecchini <simone.giannecchini@anonymised.com>:

Ciao,
as Andrea pointed out this problems has already been fixed, please try
one of the latest nightly builds.

I have to update the mosaic tutorial, but a quick advice is to just
point the mosaic plugin to the directory where your files reside. It
should build the index transparently by itself.

--
LinkedIn: http://www.linkedin.com/pub/aleksey-smirnov/13/598/3b3

Raja Kajiev ha scritto:

Checked 060909 build, got the same error when WKT definition in
shp-file differs from definition in GeoServer's epsg.properties.
I can send the data sample or test another build if you can/want to
investigate this problem.

BTW, can you help me with what the "point the mosaic plugin to the
directory where your files reside" exactly mean? What and where should
I tweak?

When setting up the mosaic store, provide the path to the directory
containing the images: GeoServer will generate the shapefile index
and the properties file for you (not sure if it generates just the
properties file when the .shp is already there, to make sure try
also removing the shapefiles).

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.