hibernate-spatial

org.postgresql.util.PGobject cannot be cast to org.postgis.PGgeometry

When I try to load points from a PostGIS database, I get the following exception: Caused by: java.lang.ClassCastException: org.postgresql.util.PGobject at org.hibernatespatial.postgis.PGGeometryUserType.convert2JTS(PGGeometryUserType.java:75) at org.hibernatespatial.AbstractDBGeometryType.nullSafeGet(AbstractDBGeometryTy...