All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead
HysanDev opened this issue ยท 3 comments
[11:39:46 INFO]: [Craftconomy3] Enabling Craftconomy3 v3.3.1-d99cf63-trv200
[11:39:46 INFO]: [Craftconomy3] Starting up!
[11:39:46 INFO]: [Craftconomy3] Loading the Configuration
[11:39:47 INFO]: [Craftconomy3] Loading listeners.
[11:39:47 INFO]: [Craftconomy3] Loading commands
[11:39:47 INFO]: [Craftconomy3] Loading the Database Manager
[11:39:47 WARN]: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
[11:39:47 WARN]: SLF4J: Defaulting to no-operation (NOP) logger implementation
[11:39:47 WARN]: SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[11:39:47 WARN]: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead
[11:39:47 WARN]: at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[11:39:47 WARN]: at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
[11:39:47 WARN]: at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[11:39:47 WARN]: at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
[11:39:47 WARN]: at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
[11:39:47 WARN]: at com.mysql.jdbc.Util.getInstance(Util.java:382)
[11:39:47 WARN]: at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052)
[11:39:47 WARN]: at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3593)
[11:39:47 WARN]: at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3525)
[11:39:47 WARN]: at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1986)
[11:39:47 WARN]: at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2140)
[11:39:47 WARN]: at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2626)
[11:39:47 WARN]: at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2111)
[11:39:47 WARN]: at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2407)
[11:39:47 WARN]: at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2325)
[11:39:47 WARN]: at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2310)
[11:39:47 WARN]: at com.greatmancode.com.zaxxer.libs.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61)
[11:39:47 WARN]: at com.greatmancode.com.zaxxer.libs.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java)
[11:39:47 WARN]: at com.greatmancode.craftconomy3.storage.sql.MySQLEngine.(MySQLEngine.java:83)
[11:39:47 WARN]: at com.greatmancode.craftconomy3.storage.StorageHandler.(StorageHandler.java:40)
[11:39:47 WARN]: at com.greatmancode.craftconomy3.Common.initialiseDatabase(Common.java:397)
[11:39:47 WARN]: at com.greatmancode.craftconomy3.Common.onEnable(Common.java:144)
[11:39:47 WARN]: at com.greatmancode.craftconomy3.tools.interfaces.BukkitLoader.onEnable(BukkitLoader.java:49)
[11:39:47 WARN]: at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:321)
[11:39:47 WARN]: at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:340)
[11:39:47 WARN]: at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:405)
[11:39:47 WARN]: at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugin(CraftServer.java:357)
[11:39:47 WARN]: at org.bukkit.craftbukkit.v1_8_R3.CraftServer.enablePlugins(CraftServer.java:317)
[11:39:47 WARN]: at net.minecraft.server.v1_8_R3.MinecraftServer.s(MinecraftServer.java:414)
[11:39:47 WARN]: at net.minecraft.server.v1_8_R3.MinecraftServer.k(MinecraftServer.java:378)
[11:39:47 WARN]: at net.minecraft.server.v1_8_R3.MinecraftServer.a(MinecraftServer.java:333)
[11:39:47 WARN]: at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:263)
[11:39:47 WARN]: at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:525)
[11:39:47 WARN]: at java.lang.Thread.run(Thread.java:748)
I am searching for this solution also and I tried building the Repo and it fails with this....
`:clean
:compileJava
warning: [options] bootstrap class path not set in conjunction with -source 1.7
Note: /home/steve/craftconomy3/src/main/java/com/greatmancode/craftconomy3/utils/OldFormatConverter.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
:processResources
:classes
:filter
:jar
:javadoc
:javadocJar
:shadowJar
:sourcesJar
:signArchives FAILED
FAILURE: Build failed with an exception.
- What went wrong:
Could not evaluate onlyIf predicate for task ':signArchives'.
java.io.FileNotFoundException: /home/steve/craftconomy3/null (Is a directory)
- Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 12.019 secs
and this.....
:clean
:compileJava
warning: [options] bootstrap class path not set in conjunction with -source 1.7
Note: /home/steve/craftconomy3/src/main/java/com/greatmancode/craftconomy3/utils/OldFormatConverter.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
:processResources
:classes
:filter
:jar
:javadoc
:javadocJar
:shadowJar
:sourcesJar
:signArchives FAILED
FAILURE: Build failed with an exception.
- What went wrong:
Could not evaluate onlyIf predicate for task ':signArchives'.
Unable to retrieve secret key from key ring file '/home/steve/craftconomy3/null' as it does not exist
- Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 12.155 secs
`
I created a fork and fixed this problem occurring on MySQL 5.7. You can download a compiled binary here: Link