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(SQLStateConverter.java:100)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.loader.Loader.doList(Loader.java:2231)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2125)
at org.hibernate.loader.Loader.list(Loader.java:2120)
at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:118)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1596)
at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:306)
***SNIP**
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(MysqlIO.java:3556)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3490)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2109)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2648)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2077)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2228)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:92)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1808)
at org.hibernate.loader.Loader.doQuery(Loader.java:697)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
at org.hibernate.loader.Loader.doList(Loader.java:2228)



Thanks in Advance,

Richard Wareing

Options: ReplyQuote


Subject
Views
Written By
Posted
Random "Cannot get geometry object from data you send to the GEOMETRY field" errors
10073
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.