Civcraft / Citadel

Do not open issues here; open them on the maintained fork @ DevotedMC
https://github.com/DevotedMC/Citadel
BSD 3-Clause "New" or "Revised" License
6 stars 23 forks source link

DB Out of date #200

Open FranciscoContreras opened 7 years ago

FranciscoContreras commented 7 years ago

When I install Citadel into my sever I get this error. It tells me that my db version is out of date but I'm running mysql 5.7 along with the latest version of paper.

[12:01:23 ERROR]: [NameLayer] Failed to prepare migrations table or register this plugin to it.
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Invalid default value for 'last_migration'
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_101]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_101]
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_101]
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_101]
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:404) ~[patched_1.10.2.jar:git-Paper-885]
        at com.mysql.jdbc.Util.getInstance(Util.java:387) ~[patched_1.10.2.jar:git-Paper-885]
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:941) ~[patched_1.10.2.jar:git-Paper-885]
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3870) ~[patched_1.10.2.jar:git-Paper-885]
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3806) ~[patched_1.10.2.jar:git-Paper-885]
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2470) ~[patched_1.10.2.jar:git-Paper-885]
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2617) ~[patched_1.10.2.jar:git-Paper-885]
        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2546) ~[patched_1.10.2.jar:git-Paper-885]
        at com.mysql.jdbc.StatementImpl.executeUpdateInternal(StatementImpl.java:1541) ~[patched_1.10.2.jar:git-Paper-885]
        at com.mysql.jdbc.StatementImpl.executeLargeUpdate(StatementImpl.java:2605) ~[patched_1.10.2.jar:git-Paper-885]
        at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1469) ~[patched_1.10.2.jar:git-Paper-885]
        at com.zaxxer.hikari.pool.ProxyStatement.executeUpdate(ProxyStatement.java:120) ~[CivModCore-1.5.02.jar:?]
        at com.zaxxer.hikari.pool.HikariProxyStatement.executeUpdate(HikariProxyStatement.java) ~[CivModCore-1.5.02.jar:?]
        at vg.civcraft.mc.civmodcore.dao.ManagedDatasource.getReady(ManagedDatasource.java:177) [CivModCore-1.5.02.jar:?]
        at vg.civcraft.mc.civmodcore.dao.ManagedDatasource.<init>(ManagedDatasource.java:170) [CivModCore-1.5.02.jar:?]
        at vg.civcraft.mc.namelayer.NameLayerPlugin.loadDatabases(NameLayerPlugin.java:141) [NameLayer-2.9.06.jar:?]
        at vg.civcraft.mc.namelayer.NameLayerPlugin.onEnable(NameLayerPlugin.java:64) [NameLayer-2.9.06.jar:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:292) [patched_1.10.2.jar:git-Paper-885]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:316) [patched_1.10.2.jar:git-Paper-885]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:407) [patched_1.10.2.jar:git-Paper-885]
        at org.bukkit.craftbukkit.v1_10_R1.CraftServer.enablePlugin(CraftServer.java:375) [patched_1.10.2.jar:git-Paper-885]
        at org.bukkit.craftbukkit.v1_10_R1.CraftServer.enablePlugins(CraftServer.java:325) [patched_1.10.2.jar:git-Paper-885]
        at net.minecraft.server.v1_10_R1.MinecraftServer.t(MinecraftServer.java:418) [patched_1.10.2.jar:git-Paper-885]
        at net.minecraft.server.v1_10_R1.MinecraftServer.l(MinecraftServer.java:383) [patched_1.10.2.jar:git-Paper-885]
        at net.minecraft.server.v1_10_R1.MinecraftServer.a(MinecraftServer.java:329) [patched_1.10.2.jar:git-Paper-885]
        at net.minecraft.server.v1_10_R1.DedicatedServer.init(DedicatedServer.java:275) [patched_1.10.2.jar:git-Paper-885]
        at net.minecraft.server.v1_10_R1.MinecraftServer.run(MinecraftServer.java:584) [patched_1.10.2.jar:git-Paper-885]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_101]
[12:01:23 ERROR]: [NameLayer] Assuming you provided proper database credentials this is most likely happening, because your mysql install is outdated. We recommend using MariaDB or at least the latest mysql version
[12:01:23 ERROR]: [NameLayer:] Stack Trace follows
 --------------------------------------
Migration failure!
 --------------------------------------
[12:01:23 ERROR]: Error occurred while enabling NameLayer v2.9.06 (Is it up to date?)
java.lang.NullPointerException
        at vg.civcraft.mc.namelayer.permission.PermissionType.registerPermission(PermissionType.java:53) ~[?:?]
        at vg.civcraft.mc.namelayer.permission.PermissionType.registerNameLayerPermissions(PermissionType.java:104) ~[?:?]
        at vg.civcraft.mc.namelayer.permission.PermissionType.initialize(PermissionType.java:28) ~[?:?]
        at vg.civcraft.mc.namelayer.NameLayerPlugin.onEnable(NameLayerPlugin.java:69) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:292) ~[patched_1.10.2.jar:git-Paper-885]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:316) [patched_1.10.2.jar:git-Paper-885]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:407) [patched_1.10.2.jar:git-Paper-885]
        at org.bukkit.craftbukkit.v1_10_R1.CraftServer.enablePlugin(CraftServer.java:375) [patched_1.10.2.jar:git-Paper-885]
        at org.bukkit.craftbukkit.v1_10_R1.CraftServer.enablePlugins(CraftServer.java:325) [patched_1.10.2.jar:git-Paper-885]
        at net.minecraft.server.v1_10_R1.MinecraftServer.t(MinecraftServer.java:418) [patched_1.10.2.jar:git-Paper-885]
        at net.minecraft.server.v1_10_R1.MinecraftServer.l(MinecraftServer.java:383) [patched_1.10.2.jar:git-Paper-885]
        at net.minecraft.server.v1_10_R1.MinecraftServer.a(MinecraftServer.java:329) [patched_1.10.2.jar:git-Paper-885]
        at net.minecraft.server.v1_10_R1.DedicatedServer.init(DedicatedServer.java:275) [patched_1.10.2.jar:git-Paper-885]
        at net.minecraft.server.v1_10_R1.MinecraftServer.run(MinecraftServer.java:584) [patched_1.10.2.jar:git-Paper-885]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_101]
[12:01:23 INFO]: [NameLayer] Disabling NameLayer v2.9.06
[12:01:23 INFO]: [Citadel] Enabling Citadel v3.5.92
[12:01:23 INFO]: [Citadel] [Citadel] Citadel is shutting down because it could not find NameLayer
[12:01:23 INFO]: [Citadel] Disabling Citadel v3.5.92
[12:01:23 ERROR]: Error occurred while disabling Citadel v3.5.92 (Is it up to date?)
java.lang.NullPointerException
        at vg.civcraft.mc.citadel.Citadel.onDisable(Citadel.java:63) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:294) ~[patched_1.10.2.jar:git-Paper-885]
        at org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(JavaPluginLoader.java:344) [patched_1.10.2.jar:git-Paper-885]
        at vg.civcraft.mc.citadel.Citadel.onEnable(Citadel.java:43) [Citadel-3.5.92.jar:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:292) [patched_1.10.2.jar:git-Paper-885]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:316) [patched_1.10.2.jar:git-Paper-885]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:407) [patched_1.10.2.jar:git-Paper-885]
        at org.bukkit.craftbukkit.v1_10_R1.CraftServer.enablePlugin(CraftServer.java:375) [patched_1.10.2.jar:git-Paper-885]
        at org.bukkit.craftbukkit.v1_10_R1.CraftServer.enablePlugins(CraftServer.java:325) [patched_1.10.2.jar:git-Paper-885]
        at net.minecraft.server.v1_10_R1.MinecraftServer.t(MinecraftServer.java:418) [patched_1.10.2.jar:git-Paper-885]
        at net.minecraft.server.v1_10_R1.MinecraftServer.l(MinecraftServer.java:383) [patched_1.10.2.jar:git-Paper-885]
        at net.minecraft.server.v1_10_R1.MinecraftServer.a(MinecraftServer.java:329) [patched_1.10.2.jar:git-Paper-885]
        at net.minecraft.server.v1_10_R1.DedicatedServer.init(DedicatedServer.java:275) [patched_1.10.2.jar:git-Paper-885]
        at net.minecraft.server.v1_10_R1.MinecraftServer.run(MinecraftServer.java:584) [patched_1.10.2.jar:git-Paper-885]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_101]
Maxopoly commented 7 years ago

Hmm this is pretty much guaranteed to be a mysql version problem, it's failing on the default value "now()" for timestamps, many others have had the same issue before and it was always that (which is why that message about your mysql version being outdated is there). Could you manually open a shell for the database you are using and do "select version();" to ensure your database is actually running mysql 5.7?

FranciscoContreras commented 7 years ago

Yeah, it does say I am running 5.7.

mysql> select version();
+-------------------------+
| version()               |
+-------------------------+
| 5.7.15-0ubuntu0.16.04.1 |
+-------------------------+
1 row in set (0.00 sec)
ProgrammerDan commented 7 years ago

I'm not certain that these plugins are actually compatible with MySQL anymore. Install Mariadb 10.1+ and you'll have no troubles.