I'm running Geoserver 2.11.2 on Java 1.8.0_144 32 bits on Amazon Linux together with Tomcat 9. The plugins I have installed are imagemosaic, imagepyramid, GeowebCache (internal) and Geofence.

When using the imagemosaic plugin I am able to use a Postgresql DB in combination with JNDI connection pooling for storing the granules and time dimension via a datastore.properties file. The file looks like:

Loose\ bbox=true
Estimated\ extends=false
validate\ connections=true
Connection\ timeout=10

Which work as expected. However when I add the same file in the imagepyramid datastructure, this setup fails. When I add this datastore.properties in just the lowest level (0) then that level gets configured in a database table, while the higher levels are configured using a shapefile. When I add a datastore.properties to all levels, geoserver returns the following error:

2017-09-28 07:39:40,780 ERROR [gce.imagemosaic] - 
    at org.geotools.gce.imagemosaic.ImageMosaicConfigHandler.createGranuleCatalogFromDatastore(ImageMosaicConfigHandler.java:406)
    at org.geotools.gce.imagemosaic.ImageMosaicConfigHandler.createCatalog(ImageMosaicConfigHandler.java:329)
    at org.geotools.gce.imagemosaic.ImageMosaicConfigHandler.buildCatalog(ImageMosaicConfigHandler.java:962)
    at org.geotools.gce.imagemosaic.ImageMosaicConfigHandler.indexingPreamble(ImageMosaicConfigHandler.java:941)
    at org.geotools.gce.imagemosaic.ImageMosaicDirectoryWalker$MosaicDirectoryWalker.<init>(ImageMosaicDirectoryWalker.java:109)
    at org.geotools.gce.imagemosaic.ImageMosaicDirectoryWalker.run(ImageMosaicDirectoryWalker.java:197)
    at org.geotools.gce.imagemosaic.Utils.createMosaic(Utils.java:460)
    at org.geotools.gce.imagemosaic.Utils.checkSource(Utils.java:1336)
    at org.geotools.gce.imagemosaic.ImageMosaicReader.initReaderFromURL(ImageMosaicReader.java:532)
    at org.geotools.gce.imagemosaic.ImageMosaicReader.<init>(ImageMosaicReader.java:479)
    at org.geotools.gce.imagemosaic.ImageMosaicFormat.getReader(ImageMosaicFormat.java:504)
    at org.geotools.gce.imagepyramid.Utils.checkSource(Utils.java:200)
    at org.geotools.gce.imagepyramid.ImagePyramidReader.<init>(ImagePyramidReader.java:177)
    at org.geotools.gce.imagepyramid.ImagePyramidFormat.getReader(ImagePyramidFormat.java:249)
    at org.geotools.gce.imagepyramid.ImagePyramidFormat.getReader(ImagePyramidFormat.java:56)
    at org.geoserver.catalog.ResourcePool.getGridCoverageReader(ResourcePool.java:1511)
    at org.geoserver.catalog.ResourcePool.getGridCoverageReader(ResourcePool.java:1441)
    at org.geoserver.catalog.impl.CoverageStoreInfoImpl.getGridCoverageReader(CoverageStoreInfoImpl.java:59)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:264)
    at org.geotools.gce.imagemosaic.ImageMosaicConfigHandler.createGranuleCatalogFromDatastore(ImageMosaicConfigHandler.java:389)
    ... 160 more

Is it possible to configure the granules of all levels in the database? And if so, how would my datastore.properties file look like? Like I said, it works fine for the lowest level (0) but it fails for all the levels above.

In case this is not possible, will it be sufficient to use the shapefiles as an index for the granules? The geoserver is used in a production environment and I am worried about performance issues when using the shapefiles as index.

Furthermore the imagepyramid automatically names the table after the level folder (0). This folder and table name are automatically created when configuring the datastore. Is there a way to custom name the folder and thus the table name? Otherwise I could end up with multiple '0' tables in the same schema.

  • 1
    The error seems to imply a typo in the datastore.properties of the higher levels, in particular the SPI configured is not a valid class name. Did you copy/paste it? – Andrea Aime Sep 29 '17 at 8:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.