Closed Silthus closed 3 years ago
Hmm, not sure what's causing this. On the master branch I'm not printing all SQL errors for some reason. Can you try this version: download link
And let me know what the stack trace / error is?
Thank you!
Thanks for the quick answer. Here is the stacktrace from the patched jar you provided.
It seems to be the same error that CoreProtect had and has to do with the latest MariaDB Version: https://www.spigotmc.org/resources/coreprotect.8631/update?update=369582
[10:43:12] [Server thread/INFO]: [broccolai.tickets.lib.hikari.HikariDataSource] DB - Starting...
[10:43:12] [Server thread/INFO]: [broccolai.tickets.lib.hikari.HikariDataSource] DB - Start completed.
[10:43:12] [Server thread/WARN]: java.sql.SQLException: Malformed communication packet
[10:43:12] [Server thread/WARN]: at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:965)
[10:43:12] [Server thread/WARN]: at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3933)
[10:43:12] [Server thread/WARN]: at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3869)
[10:43:12] [Server thread/WARN]: at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2524)
[10:43:12] [Server thread/WARN]: at com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1281)
[10:43:12] [Server thread/WARN]: at com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:787)
[10:43:12] [Server thread/WARN]: at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2023)
[10:43:12] [Server thread/WARN]: at broccolai.tickets.lib.hikari.pool.ProxyPreparedStatement.executeQuery(ProxyPreparedStatement.java:52)
[10:43:12] [Server thread/WARN]: at broccolai.tickets.lib.hikari.pool.HikariProxyPreparedStatement.executeQuery(HikariProxyPreparedStatement.java)
[10:43:12] [Server thread/WARN]: at broccolai.tickets.lib.idb.DbStatement.execute(DbStatement.java:274)
[10:43:12] [Server thread/WARN]: at broccolai.tickets.lib.idb.Database.getFirstColumn(Database.java:131)
[10:43:12] [Server thread/WARN]: at broccolai.tickets.lib.idb.DB.getFirstColumn(DB.java:96)
[10:43:12] [Server thread/WARN]: at broccolai.tickets.storage.platforms.MySQL.setup(MySQL.java:44)
[10:43:12] [Server thread/WARN]: at broccolai.tickets.storage.SQLManager.setup(SQLManager.java:30)
[10:43:12] [Server thread/WARN]: at broccolai.tickets.PureTickets.onEnable(PureTickets.java:30)
[10:43:12] [Server thread/WARN]: at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263)
[10:43:12] [Server thread/WARN]: at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:380)
[10:43:12] [Server thread/WARN]: at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:483)
[10:43:12] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugin(CraftServer.java:501)
[10:43:12] [Server thread/WARN]: at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugins(CraftServer.java:415)
[10:43:12] [Server thread/WARN]: at net.minecraft.server.v1_16_R3.MinecraftServer.loadWorld(MinecraftServer.java:468)
[10:43:12] [Server thread/WARN]: at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:239)
[10:43:12] [Server thread/WARN]: at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:940)
[10:43:12] [Server thread/WARN]: at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:177)
[10:43:12] [Server thread/WARN]: at java.base/java.lang.Thread.run(Unknown Source)
[10:43:12] [Server thread/INFO]: [PureTickets] Disabling PureTickets v3.1.2
[10:43:12] [Server thread/INFO]: [broccolai.tickets.lib.hikari.HikariDataSource] DB - Shutdown initiated...
[10:43:12] [Server thread/INFO]: [broccolai.tickets.lib.hikari.HikariDataSource] DB - Shutdown completed.
Hmmm, I've seen a few plugins with this. Not sure the best way to go about fixing it, I'll need to set up a mariadb instance locally. For now, can you try reverting your mariadb driver version to an earlier date to see if that fixes it? I'm also interested to see if it works on the jdbi rewrite in the dev branch which should be stable in a few days.
Thank you :)
There is a docker image (which we use on our server) that you can use to try it out locally: https://hub.docker.com/_/mariadb
Also I don't know if it helps or is worth the effor, but I have an ebean-wrapper that can handle all of the SQL stuff for you and allows working with plain DTOs: https://github.com/silthus/ebean-wrapper
Should be fixed in 5.0
Thanks for the great plugin, I really like the idea of the Discord connection. However I get an SQL error when the plugin starts.
The connection to the database however was successful and the tables were created.