Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to get postgis raster layers in geoserver-2.3.1, with postgresql-8.4, postgis-2.0 and gt-imagemosaic-jdbc-9.1.jar support. I'm going through the tutorial with a PNG raster that i have. In the last step i'm stuck with a java exception...can't really understand what is it!? I've tried other jdbc-postgresql driver and less tiles but the error seems to come up everytime.

Here is the output! Any interpretations? Every help is welcome. Thanks

java -jar ~rdfs_run/geoserver/geoserver-2.3.1/webapps/geoserver/WEB-INF/lib/gt-imagemosaic-jdbc-9.1.jar import -config ~rdfs_run/geoserver/geoserver-2.3.1/data_dir/coverages/postgis/aveiro.postgis.xml -spatialTNPrefix tileaveiro -tileTNPrefix tileaveiro -dir tiles -ext png
Apr 28, 2013 8:50:34 PM org.geotools.gce.imagemosaic.jdbc.Import logInfo
INFO: Truncating table : tileaveiro_0
Apr 28, 2013 8:50:34 PM org.geotools.gce.imagemosaic.jdbc.Import logInfo
INFO: Number of tiles to import: 48
Apr 28, 2013 8:50:34 PM org.geotools.gce.imagemosaic.jdbc.Import logInfo
INFO: Inserted tile AveiroRDFS_rgb_5_8.png : 1/48
INFO: Inserted tile AveiroRDFS_rgb_3_8.png : 48/48
    java.sql.BatchUpdateException: Batch entry 0 INSERT INTO tileaveiro_0 (location,geom,data) VALUES  ('AveiroRDFS_rgb_5_8.png',geomfromwkb(?,4326),?) was aborted.  Call getNextException to see the cause.
        at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(
        at org.postgresql.core.v3.QueryExecutorImpl.execute(
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(
        at org.geotools.gce.imagemosaic.jdbc.Import.sqlCommit(
        at org.geotools.gce.imagemosaic.jdbc.Import.fillSpatialTable(
        at org.geotools.gce.imagemosaic.jdbc.Import.start(
        at org.geotools.gce.imagemosaic.jdbc.Toolbox.main(
share|improve this question

Found the plugin (from Geotools) probably doesn't support PostGIS 2.0: geomfromwkb function is not defined - in newer versions it is st_geomfromwkb.

Right now i'm using an older postgis/postgres database.

share|improve this answer
If you load the legacy.sql file it will provide the function signature you need. – Paul Ramsey Sep 29 '13 at 4:04

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.