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)
|