-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: MySQL Data truncation: Data too long for column
PostPosted: Wed Aug 07, 2013 9:11 am 
Newbie

Joined: Thu Aug 01, 2013 7:33 pm
Posts: 2
I am doing a small POC that has Hibernate (Object Grid Mapper) -> Infinispan -> MySQL as the data store.

It works, however, I am getting the below error. By default in the guides for Infinispan using org.infinispan.loaders.jdbc.binary.JdbcBinaryCacheStore , the data type is binary(1), I changed that to everything I could think of (varbinary, longtext, longclob), and everything results in the below error.

I don't think the data can be that long, so surprised.





<property name="connectionUrl" value="jdbc:mysql:///infinispan" />

<property name="userName" value="root" />

<property name="password" value="root" />

<property name="driverClass" value="com.mysql.jdbc.Driver" />

<property name="idColumnType" value="VARCHAR(255)"/>

<property name="dataColumnType" value="LONGTEXT"/>


The error is (data does get stored FYI):


12:30:53,458 ERROR JdbcBinaryCacheStore:219 - ISPN008012: Sql failure while inserting bucket: Bucket{entries={RowKey{table='sequences', columnNames=[key], columnValues=[dog]}=ImmortalCacheEntry{key=RowKey{table='sequences', columnNames=[key], columnValues=[dog]}, value=ImmortalCacheValue {value=101}}}, bucketId='-164422656'}

com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'DATA_COLUMN' at row 1

at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3489)

at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)

at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1936)

at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)

at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2542)

at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1734)

at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2019)

at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1937)

at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1922)

at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)

at org.infinispan.loaders.jdbc.binary.JdbcBinaryCacheStore.insertBucket(JdbcBinaryCacheStore.java:214)

at org.infinispan.loaders.bucket.BucketBasedCacheStore.storeLockSafe(BucketBasedCacheStore.java:94)

at org.infinispan.loaders.bucket.BucketBasedCacheStore.storeLockSafe(BucketBasedCacheStore.java:49)

at org.infinispan.loaders.LockSupportCacheStore.store(LockSupportCacheStore.java:213)

at org.infinispan.loaders.AbstractCacheStore.applyModifications(AbstractCacheStore.java:126)

at org.infinispan.loaders.AbstractCacheStore.prepare(AbstractCacheStore.java:144)

at org.infinispan.loaders.decorators.AsyncStore.applyModificationsSync(AsyncStore.java:340)

at org.infinispan.loaders.decorators.AsyncStore$AsyncStoreProcessor.retryWork(AsyncStore.java:743)

at org.infinispan.loaders.decorators.AsyncStore$AsyncStoreProcessor.run(AsyncStore.java:727)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

at java.lang.Thread.run(Thread.java:662)


Top
 Profile  
 
 Post subject: Re: MySQL Data truncation: Data too long for column
PostPosted: Thu Aug 08, 2013 6:20 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
I would expect that as well. Could you please ask/report this on the Infinispan community? https://community.jboss.org/en/infinispan?view=discussions
thanks!

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.