I use Geoserver 2.1.3 and "POSTGIS="1.5.3" GEOS="3.2.2-CAPI-1.6.2" PROJ="Rel. 4.7.1, 23 September 2009" LIBXML="2.7.6" USE_STATS" on PostgreSQL 9.1

From time to time (well - today I can't get around it anymore) I get the following error when I try to "calc native bounds from data" while creating a new layer in Geoserver.

    java.lang.RuntimeException: java.io.IOException: Error occured calculating bounds at 
org.geotools.jdbc.JDBCFeatureSource.getBoundsInternal(JDBCFeatureSource.java:485) at 
org.geotools.jdbc.JDBCFeatureStore.getBoundsInternal(JDBCFeatureStore.java:179) at 
org.geotools.data.store.ContentFeatureSource.getBounds(ContentFeatureSource.java:370) at 
    Caused by: java.io.IOException: Error occured calculating bounds at 
    org.geotools.jdbc.JDBCDataStore.getBounds(JDBCDataStore.java:1137) at 
    org.geotools.jdbc.JDBCFeatureSource.getBoundsInternal(JDBCFeatureSource.java:478) ... 
    94 more 
    Caused by: org.postgresql.util.PSQLException: ERROR: function st_envelope(box3d_extent) does not exist 
    No function matches the given name and argument types. You might need to add explicit type casts. Position: 30

The geometry column contains points, the SRID is defined in the *geometry_columns* tables. And it worked before... Anyways.. I will upgrade to PostGIS2 in a few weeks.. For now I need help on how to transform a PostGIS box3d_extent to a geometry.

With that information I want to dirty-quick-fix this with the creation of a local hack-function st_envelope(box3d_extent) which would then call st_envelope(geometry).

Thanks in advance for any answers helping with the cast- and/or base problem ;-)


1 Answer 1


You are suffering from this bug I posted which is an issue with the upgrade script.


Just create a cast as noted in the ticket.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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