Hibernate Spatial Wildfly 27.0.1

136 views
Skip to first unread message

dt pham

unread,
Dec 22, 2022, 9:43:34 AM12/22/22
to WildFly
Hi all,
   I am migrating my project from wildfly 24.0.0 to wildfly 27.0.1. My database is MySql. Basically my application is working fine , except for Java Entities which include Geometry data in there.
In Wildfly 24, I added three additional modules, mysql driver,  hibernate spatial, and vividsolution JTS ( I use this for Geometry java type of my entities). Of course it is working for long.

In Wildfly 27, I did the same but with latest versions: mysql-connector-j-8.0.31 and  hibernate-spatial-6.1.5.Final and vividsolution jts. I also try to use locationtect jts, but both ended up failed. 
Is there some thing I may miss when moving from 24 to 27 especially for hibernate version 5 to 6. Here is short error:
    ... 142 more
Caused by: com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Cannot get geometry object from data you send to the GEOMETRY field
    at com.networks....@8.0.31//com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:104)
    at com.networks....@8.0.31//com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:916)
    at com.networks....@8.0.31//com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1061)
    at com.networks....@8.0.31//com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1009)
    at com.networks....@8.0.31//com.mysql.cj.jdbc.ClientPreparedStatement.executeLargeUpdate(ClientPreparedStatement.java:1320)
    at com.networks....@8.0.31//com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdate(ClientPreparedStatement.java:994)
    at org.jboss.ironjac...@1.5.9.Final//org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:537)
    at org.hi...@6.1.5.Final//org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:197)
    ... 154 more 

Message has been deleted

dt pham

unread,
Feb 1, 2023, 2:52:15 PM2/1/23
to WildFly
I finally got it working. It was just configuration issue.
Reply all
Reply to author
Forward
0 new messages