MySQL Forums
Forum List  »  GIS

Random "Cannot get geometry object from data you send to the GEOMETRY field" errors
Posted by: Richard Wareing
Date: June 22, 2010 10:12AM

Hello All,

I know this MIGHT be a hibernate issue, but I'd thought I'd ask here anyhow on the outside chance this error has nothing to do with Hibernate, as the root cause of the exception is a MySQL JDBC error...

Now keep in mind 99% of the time the EXACT query/method call works perfectly on the exact same data. But RANDOMLY, sometimes it spits out this error, and for the life of me I've never been able to figure it out. The spatial data is valid and ok, as like I said, the error is seemingly random and the exact same query/method call will work just fine if run again. Here is the stack trace:

org.hibernate.exception.DataException: could not execute query
at org.hibernate.exception.SQLStateConverter.convert(
at org.hibernate.exception.JDBCExceptionHelper.convert(
at org.hibernate.loader.Loader.doList(
at org.hibernate.loader.Loader.listIgnoreQueryCache(
at org.hibernate.loader.Loader.list(
at org.hibernate.loader.criteria.CriteriaLoader.list(
at org.hibernate.impl.SessionImpl.list(
at org.hibernate.impl.CriteriaImpl.list(
Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Cannot get geometry object from data you send to the GEOMETRY field
at com.mysql.jdbc.MysqlIO.checkErrorPacket(
at com.mysql.jdbc.MysqlIO.checkErrorPacket(
at com.mysql.jdbc.MysqlIO.sendCommand(
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(
at com.mysql.jdbc.ConnectionImpl.execSQL(
at com.mysql.jdbc.PreparedStatement.executeInternal(
at com.mysql.jdbc.PreparedStatement.executeQuery(
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(
at org.hibernate.jdbc.AbstractBatcher.getResultSet(
at org.hibernate.loader.Loader.getResultSet(
at org.hibernate.loader.Loader.doQuery(
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(
at org.hibernate.loader.Loader.doList(

Thanks in Advance,

Richard Wareing

Options: ReplyQuote

Written By
Random "Cannot get geometry object from data you send to the GEOMETRY field" errors
June 22, 2010 10:12AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.