Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

What is the best solution to publish postgis rasters using Geoserver?

I have spent a lot of time trying to create a Raster datasource using Image Mosaic JDBC but with no luck.

Steps performed:
1. Downloaded and Installed the JDBC Image Mosaic extension (worked ok)
2. Created the "Connection Parameter" files:


  <dstype value="DBCP"/>
  <username value="postgres" />
  <password value="password" />
  <jdbcUrl value="jdbc:postgresql://localhost:5432/db1" />
  <driverClassName value="org.postgresql.Driver"/>
  <maxActive value="10"/>
  <maxIdle value="0"/>


<spatialExtension name="postgis"/>
    <masterTable name="mosaic" >
        <coverageNameAttribute name="name"/>
        <maxXAttribute name="maxX"/>
        <maxYAttribute name="maxY"/>
        <minXAttribute name="minX"/>
        <minYAttribute name="minY"/>
        <resXAttribute name="resX"/>
        <resYAttribute name="resY"/>
        <tileTableNameAtribute name="tiletable" />
        <blobAttributeName name="rast" />


<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE ImageMosaicJDBCConfig [
  <!ENTITY mapping PUBLIC "mapping"  "mapping.postgis.xml.inc">
  <!ENTITY connect PUBLIC "connect"  "connect.postgis.xml.inc">]>
<config version="1.0">
  <coverageName name="gfm"/>
  <coordsys name="EPSG:25832"/>
  <!-- interpolation 1 = nearest neighbour, 2 = bilinear, 3 = bicubic -->
  <scaleop  interpolation="1"/>
  <verify cardinality="false"/>

where "mosaic" is a table (columns: name, titletable,minX,minY,maxX,maxY,resX,resY) containing one row: "gfm, testrastertable, , , , , , ,"

3. Saved the config files in ../geoserver/data_dir/coverages/
4. While trying to add an Image Mosaic JDBC data store I receive the following error:

Error: Could not list layers for this store, an error occurred retrieving them: Unable to acquire a reader for this coverage with format: ImageMosaicJDBC

Update: Geoserver log

2012-10-24 14:09:11,404 DEBUG [org.geoserver] - Thread 14 locking in mode WRITE
2012-10-24 14:09:11,404 DEBUG [org.geoserver] - Thread 14 got the lock in mode WRITE
2012-10-24 14:09:11,406 DEBUG [geoserver.config] - Persisting coverage store raster_store
2012-10-24 14:09:11,408 DEBUG [geoserver.config] - Persisted org.geoserver.catalog.impl.CoverageStoreInfoImpl to /opt/geoserver/data_dir/workspaces/raster/raster_store/coveragestore.xml
2012-10-24 14:09:11,416 DEBUG [geoserver.config] - Persisted $Proxy15 to /opt/geoserver/data_dir/global.xml
2012-10-24 14:09:11,438 ERROR [imagemosaic.jdbc] - 
2012-10-24 14:09:11,438 WARN [imagemosaic.jdbc] - 
    at org.geotools.gce.imagemosaic.jdbc.ImageMosaicJDBCReader.<init>(ImageMosaicJDBCReader.java:163)
    at org.geotools.gce.imagemosaic.jdbc.ImageMosaicJDBCFormat.getReader(ImageMosaicJDBCFormat.java:209)
2012-10-24 14:09:11,439 INFO [geoserver.web] - Getting list of coverages for saved store file:coverages/osm.postgis.xml
java.lang.RuntimeException: Could not list layers for this store, an error occurred retrieving them: Unable to acquire a reader for this coverage with format: ImageMosaicJDBC
    at org.geoserver.web.data.layer.NewLayerPageProvider.getItems(NewLayerPageProvider.java:115)
Caused by: java.lang.Exception: Unable to acquire a reader for this coverage with format: ImageMosaicJDBC
    at org.geoserver.catalog.CatalogBuilder.buildCoverage(CatalogBuilder.java:812)
    at org.geoserver.web.data.layer.NewLayerPageProvider.getItems(NewLayerPageProvider.java:82)
    ... 95 more
2012-10-24 14:09:11,441 DEBUG [geoserver.config] - Removing coverage store raster_store
2012-10-24 14:09:11,446 DEBUG [geoserver.config] - Persisted $Proxy15 to /opt/geoserver/data_dir/global.xml
2012-10-24 14:09:11,459 DEBUG [org.geoserver] - Thread 14 releasing the lock in mode WRITE
share|improve this question
turn logging up to verbose and check the log file –  iant Oct 24 '12 at 10:59
just updated with the log...doesn't tell me too much –  asp Oct 24 '12 at 11:21
As no-one here seems able to help, you could try the GeoServer mailing list: geoserver.org/display/GEOS/Mailing+Lists –  GIS-Jonathan Nov 9 '12 at 14:49
Any update on this question? –  Pablo Mar 15 '13 at 17:13
No updates... I had to drop the idea of creating a JDBC Image Mosaic because i just couldn't create it in Geoserver. I am using now the ImagePyramid store and files are kept on the disk. –  asp Mar 25 '13 at 17:35

1 Answer 1

Following the configuration instructions for the PostGIS raster plugin, you should try replacing

<spatialExtension name="postgis"/>


<spatialExtension name="pgraster"/>

in configration file mapping.postgis.xml.inc.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.