Nutty101 / NPC-Police

Provides a system of jails, NPC police and general justice system to your server
https://www.spigotmc.org/threads/jailer-citizens-plugin.78420/
0 stars 0 forks source link

Database error #21

Closed salt42 closed 5 years ago

salt42 commented 5 years ago

Hi, i use mysql not mysqlite and i get this error.

[02:02:05] [NPC_Police-MySql DB/WARN]: java.sql.SQLException: Data truncated for column 'offense_date' at row 1 [02:02:05] [NPC_Police-MySql DB/WARN]: at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:965) [02:02:05] [NPC_Police-MySql DB/WARN]: at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3978) [02:02:05] [NPC_Police-MySql DB/WARN]: at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3914) [02:02:05] [NPC_Police-MySql DB/WARN]: at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2530) [02:02:05] [NPC_Police-MySql DB/WARN]: at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2683) [02:02:05] [NPC_Police-MySql DB/WARN]: at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2495) [02:02:05] [NPC_Police-MySql DB/WARN]: at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1903) [02:02:05] [NPC_Police-MySql DB/WARN]: at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2124) [02:02:05] [NPC_Police-MySql DB/WARN]: at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2058) [02:02:05] [NPC_Police-MySql DB/WARN]: at com.mysql.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:5158) [02:02:05] [NPC_Police-MySql DB/WARN]: at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2043) [02:02:05] [NPC_Police-MySql DB/WARN]: at net.livecar.nuttyworks.npc_police.database.Database_MySql.saveUserData(Database_MySql.java:414) [02:02:05] [NPC_Police-MySql DB/WARN]: at net.livecar.nuttyworks.npc_police.database.Database_MySql.processQueue(Database_MySql.java:220) [02:02:05] [NPC_Police-MySql DB/WARN]: at net.livecar.nuttyworks.npc_police.database.Database_MySql.run(Database_MySql.java:174) [02:02:05] [NPC_Police-MySql DB/WARN]: at java.lang.Thread.run(Thread.java:748)

I fixed it by changeing the datatype of the "offense_date" collumn to date. it was set to bigint(20). Now i get this error:

[02:25:37 WARN]: com.mysql.jdbc.exceptions.MySQLTimeoutException: Statement cancelled due to timeout or client request [02:25:37 WARN]: at com.mysql.jdbc.StatementImpl.executeUpdateInternal(StatementImpl.java:1572) [02:25:37 WARN]: at com.mysql.jdbc.StatementImpl.executeLargeUpdate(StatementImpl.java:2607) [02:25:37 WARN]: at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1480) [02:25:37 WARN]: at net.livecar.nuttyworks.npc_police.database.Database_MySql.saveUserData(Database_MySql.java:399) [02:25:37 WARN]: at net.livecar.nuttyworks.npc_police.database.Database_MySql.processQueue(Database_MySql.java:220) [02:25:37 WARN]: at net.livecar.nuttyworks.npc_police.database.Database_MySql.run(Database_MySql.java:174) [02:25:37 WARN]: at java.lang.Thread.run(Thread.java:748)

Nutty101 commented 5 years ago

Whooops, I will get that fixed.

Nutty101 commented 5 years ago

Fix added to the creation scripts for MySql. Closing