Error: Invalid endian flag value encountered with Hibernate 6 and Spring Boot 3

Viewed 22

I am having some problems with Hibernate Spatial 6 with PostGIS and Spring Boot 3.0. This project I have taken and upgraded to SB 3.0 SNAPSHOT: https://github.com/murphye/spring-boot-postgis

I am getting this error when I try to run a query:

Caused by: org.postgresql.util.PSQLException: ERROR: Invalid endian flag value encountered.

I am setting the dialect, but supposedly with Hibernate 6, this should no longer be necessary:

database-platform: org.hibernate.spatial.dialect.postgis.PostgisPG10Dialect

Here is the column causing the issue:

    @Column(columnDefinition = "geometry(Point,4326)")
    private Point geom;

and the query:

@Query(value="SELECT * from us_cities where ST_DistanceSphere(geom, :p) < :distanceM", nativeQuery = true)

Any thoughts on what the problem may be? It was working in Spring Boot 2.5. Thank you.

0 Answers
Related