1

Im trying to use hibernate spatial. I have done following configurations....

hibernate.version 5.2.2.Final

MySQL 5.7

<dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-spatial</artifactId>
        <version>5.2.10.Final</version>
    </dependency>
    <dependency>
        <groupId>com.vividsolutions</groupId>
        <artifactId>jts</artifactId>
        <version>1.13</version>
    </dependency>

hibernate.dialect =[org.hibernate.spatial.dialect.mysql.MySQLSpatialDialect]

@Column(name = "GeoLocation", columnDefinition = "Point") public Point getGeoLocation() {
    return geoLocation;
}

But its giving me error :-

org.hibernate.tool.schema.spi.SchemaManagementException: Schema-validation: wrong column type encountered in column [GeoLocation] in table [osamdb.customerlocations]; found [geometry (Types#BINARY)], but expecting [point (Types#ARRAY)]

What i'm missing??

1 Answers1

2

Figured it out!!

Removed columnDefinition.. And everything worked fine then..