TrueMB / DiscordNotify

Connects your Discord Server with your Minecraft Server!
https://www.spigotmc.org/resources/discordnotify-notifications-and-utils-for-discord.94230/
GNU General Public License v2.0
7 stars 6 forks source link

Data truncation: Data too long for column 'IP' at row 1 #12

Closed RealKomander closed 1 year ago

RealKomander commented 1 year ago

Every time a player is being connected to the server, this error is sent to the console:

[14:53:08 ERROR]: com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Data too long for column 'IP' at row 1
[14:53:08 ERROR]:       at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:104)
[14:53:08 ERROR]:       at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953)
[14:53:08 ERROR]:       at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1098)
[14:53:08 ERROR]:       at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1046)
[14:53:08 ERROR]:       at com.mysql.cj.jdbc.ClientPreparedStatement.executeLargeUpdate(ClientPreparedStatement.java:1371)
[14:53:08 ERROR]:       at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdate(ClientPreparedStatement.java:1031)
[14:53:08 ERROR]:       at me.truemb.discordnotify.database.AsyncMySQL$MySQL.queryUpdate(AsyncMySQL.java:111)
[14:53:08 ERROR]:       at me.truemb.discordnotify.database.AsyncMySQL$MySQL.queryUpdate(AsyncMySQL.java:102)
[14:53:08 ERROR]:       at me.truemb.discordnotify.database.AsyncMySQL.lambda$queryUpdate$1(AsyncMySQL.java:50)
[14:53:08 ERROR]:       at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
[14:53:08 ERROR]:       at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[14:53:08 ERROR]:       at java.base/java.lang.Thread.run(Thread.java:833)
TrueMB commented 1 year ago

Delete the row IP on your database in the table disnotify_offlineData. This will create after the next server restart the correct size.

You can also edit the value of IP to the size of 120.

This is a bug from the old versions. It was fixed for new installation. But since I didn't want to break existing databases, you need to manually do it.