1
休眠核心4.1.4最終
休眠空間4.0-M1
JTS 1.8
的Hibernate空間的PostGIS 1.1。 1
在JBoss 7.1上使用JPA 2.0
我試試荷蘭國際集團映射幾何列(OpenStreetMap的數據庫在PostGIS)向JP-A-實體是這樣的:
import org.hibernate.annotations.Type;
import com.vividsolutions.jts.geom.Geometry;
@Type(type="org.hibernate.spatial.GeometryType")
@Column(name = "way", nullable = true)
private Geometry geom;
的連接似乎罰款和其它列被反序列化細。隨着幾何列,我得到這個異常:
java.lang.UnsupportedOperationException
at org.hibernate.spatial.GeometrySqlTypeDescriptor.getExtractor(GeometrySqlTypeDescriptor.java:57)
at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:269)
at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:265)
at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:238)
at org.hibernate.type.AbstractStandardBasicType.hydrate(AbstractStandardBasicType.java:357)
...