taylorkelly / BigBrother

GNU General Public License v3.0
29 stars 20 forks source link

BB sql insert data exception #72

Open antecedo opened 13 years ago

antecedo commented 13 years ago

Data too long for column data at row 1?

Im sorry this is not very self explanitory... I dont have a lot of time to post it. Your hard work is more than appreciated.

I get these errors repeating in the console about an hour after I start the server.

20:04:39 [SEVERE] [BBROTHER] Data Insert SQL Exception when sending blocks java.sql.BatchUpdateException: Data truncation: Data too long for column 'data' at row 1 at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2018) at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1449) at me.taylorkelly.bigbrother.datasource.DataBlockSender.sendBlocksSQL(DataBlockSender.java:85) at me.taylorkelly.bigbrother.datasource.DataBlockSender.access$000(DataBlockSender.java:25) at me.taylorkelly.bigbrother.datasource.DataBlockSender$SendingTask.run(DataBlockSender.java:224) at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:33) at java.lang.Thread.run(Thread.java:662)

20:04:39 [SEVERE] [BBROTHER] Possible cause of previous SQLException:

20:04:39 [WARNING] [BBROTHER] SQL send failed. Keeping data for later send.

20:04:45 [SEVERE] [BBROTHER] Data Insert SQL Exception when sending blocks java.sql.BatchUpdateException: Data truncation: Data too long for column 'data' at row 1 at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2018) at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1449) at me.taylorkelly.bigbrother.datasource.DataBlockSender.sendBlocksSQL(DataBlockSender.java:85) at me.taylorkelly.bigbrother.datasource.DataBlockSender.access$000(DataBlockSender.java:25) at me.taylorkelly.bigbrother.datasource.DataBlockSender$SendingTask.run(DataBlockSender.java:224) at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:33) at java.lang.Thread.run(Thread.java:662)

20:04:45 [SEVERE] [BBROTHER] Possible cause of previous SQLException:

20:04:45 [WARNING] [BBROTHER] SQL send failed. Keeping data for later send.

20:04:51 [SEVERE] [BBROTHER] Data Insert SQL Exception when sending blocks java.sql.BatchUpdateException: Data truncation: Data too long for column 'data' at row 1 at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2018) at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1449) at me.taylorkelly.bigbrother.datasource.DataBlockSender.sendBlocksSQL(DataBlockSender.java:85) at me.taylorkelly.bigbrother.datasource.DataBlockSender.access$000(DataBlockSender.java:25) at me.taylorkelly.bigbrother.datasource.DataBlockSender$SendingTask.run(DataBlockSender.java:224) at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:33)

A server restart fixes the problem for another hour or so...

Again - thanks for your hard work and your help!

UPDATE changing the data type to text instead of varchar 500 fixes this issue

ithamsteri commented 13 years ago

I have this problem, but I restart server and all OK. 0_o

jopika commented 13 years ago

it CONSTANTLY does that to me >.<