I'm trying to persist a com.vividsolutions.jts.geom.Polygon in my PostgreSQL (with PostGIS enabled) database, using Hibernate and Hibernate-Spatial plugin.
Caused by: org.postgresql.util.PSQLException: One can not infer the SQL type to use for an instance of org.postgis.PGgeometry
It fired the below exception. What am I doing wrong?
My pom.xml
org.hibernate hibernate-spatial ${version.hibernate.spatial} //version 4.3 postgresql postgresql org.postgis postgis-jdbc org.hibernate hibernate-core com.vividsolutions jts ${version.vividsolutions.jts} //version 1.13 org.postgis postgis-jdbc ${version.jdbc.postgis.version} //version 2.1.3 persistence.xml
org.hibernate.ejb.HibernatePersistence java:jboss/datasources/testDS ...My module in Wildfly
modules/org/postgresql/main
module.xmlpostgis-jdbc-2.1.3.jarpostgresql-9.3-1101.jdbc4.jarstandalone.xml
jdbcostgresql://localhost:5432/testDB postgresql-driver postgres postgres org.postgresql.DriverMapping
@Column(name = "perimeter", columnDefinition = "Geometry")@Type(type = "org.hibernate.spatial.GeometryType")private Polygon perimeter;
أكثر...
Caused by: org.postgresql.util.PSQLException: One can not infer the SQL type to use for an instance of org.postgis.PGgeometry
It fired the below exception. What am I doing wrong?
My pom.xml
org.hibernate hibernate-spatial ${version.hibernate.spatial} //version 4.3 postgresql postgresql org.postgis postgis-jdbc org.hibernate hibernate-core com.vividsolutions jts ${version.vividsolutions.jts} //version 1.13 org.postgis postgis-jdbc ${version.jdbc.postgis.version} //version 2.1.3 persistence.xml
org.hibernate.ejb.HibernatePersistence java:jboss/datasources/testDS ...My module in Wildfly
modules/org/postgresql/main
module.xmlpostgis-jdbc-2.1.3.jarpostgresql-9.3-1101.jdbc4.jarstandalone.xml
jdbcostgresql://localhost:5432/testDB postgresql-driver postgres postgres org.postgresql.DriverMapping
@Column(name = "perimeter", columnDefinition = "Geometry")@Type(type = "org.hibernate.spatial.GeometryType")private Polygon perimeter;
أكثر...