Ban Management

Ban Management

193k Downloads

SQLException

EvilOlaf opened this issue ยท 2 comments

commented

Just received this warning

[09:41:20 WARN]: java.sql.SQLException: Unable to run insert stmt on object me.confuser.banmanager.data.PlayerMuteRecord@1ad4d4f9: INSERT INTO `bm_player_mute_records` (`player_id` ,`reason` ,`expired` ,`actor_id` ,`pastActor_id` ,`pastCreated` ,`created` ,`createdReason` ,`soft` ) VALUES (?,?,?,?,?,?,?,?,?)
[09:41:20 WARN]:        at me.confuser.banmanager.internal.ormlite.misc.SqlExceptionUtil.create(SqlExceptionUtil.java:22)
[09:41:20 WARN]:        at me.confuser.banmanager.internal.ormlite.stmt.mapped.MappedCreate.insert(MappedCreate.java:135)
[09:41:20 WARN]:        at me.confuser.banmanager.internal.ormlite.stmt.StatementExecutor.create(StatementExecutor.java:450)
[09:41:20 WARN]:        at me.confuser.banmanager.internal.ormlite.dao.BaseDaoImpl.create(BaseDaoImpl.java:310)
[09:41:20 WARN]:        at me.confuser.banmanager.storage.PlayerMuteRecordStorage.addRecord(PlayerMuteRecordStorage.java:40)
[09:41:20 WARN]:        at me.confuser.banmanager.runnables.ExpiresSync.run(ExpiresSync.java:56)
[09:41:20 WARN]:        at me.confuser.banmanager.runnables.Runner.run(Runner.java:28)
[09:41:20 WARN]:        at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftTask.run(CraftTask.java:71)
[09:41:20 WARN]:        at org.bukkit.craftbukkit.v1_8_R3.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
[09:41:20 WARN]:        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[09:41:20 WARN]:        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[09:41:20 WARN]:        at java.lang.Thread.run(Thread.java:745)
[09:41:20 WARN]: Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'soft' in 'field list'
[09:41:20 WARN]:        at sun.reflect.GeneratedConstructorAccessor200.newInstance(Unknown Source)
[09:41:20 WARN]:        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[09:41:20 WARN]:        at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
[09:41:20 WARN]:        at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
[09:41:20 WARN]:        at com.mysql.jdbc.Util.getInstance(Util.java:382)
[09:41:20 WARN]:        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052)
[09:41:20 WARN]:        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3593)
[09:41:20 WARN]:        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3525)
[09:41:20 WARN]:        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1986)
[09:41:20 WARN]:        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2140)
[09:41:20 WARN]:        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2626)
[09:41:20 WARN]:        at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2111)
[09:41:20 WARN]:        at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2407)
[09:41:20 WARN]:        at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2325)
[09:41:20 WARN]:        at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2310)
[09:41:20 WARN]:        at me.confuser.banmanager.internal.ormlite.jdbc.JdbcDatabaseConnection.insert(JdbcDatabaseConnection.java:170)
[09:41:20 WARN]:        at me.confuser.banmanager.internal.ormlite.stmt.mapped.MappedCreate.insert(MappedCreate.java:91)
[09:41:20 WARN]:        ... 10 more

BM5.7.1
Edit: I think I've got this build from CI, as I added the build number 207 to the file name. Well should be the same anyways.

commented

Hm 5.7 should have created the soft column

Try running the following manually:

ALTER TABLE `bm_player_mute_records` ADD COLUMN `soft` TINYINT(1)
commented

Done. Lets see if it persists...