Xanium1 / GemsEconomy

One of my spigot plugins. Minecraft Economy plugin with multi currency support!
14 stars 30 forks source link

Can't connect to mysql storage #5

Closed msengbusch closed 3 years ago

msengbusch commented 3 years ago

GemsEconomy can not connect to my mysql database and isn't loaded.

After I reinstalled my minecraft server and recreated all configs GemsEconomy can't connect to mysql and throws a exception. The credentials of the database and the config file of GemsEconomy are 100% percent the same.

I don't know what to do.

GemsEconomy Version: 4.9.2

latest.log

[16:19:17] [Server thread/INFO]: [GemsEconomy] Enabling GemsEconomy v4.9.2
[16:19:17] [Server thread/INFO]: [com.zaxxer.hikari.HikariDataSource] HikariPool-1 - Starting...
[16:19:17] [Server thread/WARN]: java.lang.RuntimeException: Failed to get driver instance for jdbcUrl=jdbc:mysql://ms2749.gamedata.io:3306/ni4621364_1_DB?allowPublicKeyRetrieval=true&useSSL=false
[16:19:17] [Server thread/WARN]:    at com.zaxxer.hikari.util.DriverDataSource.<init>(DriverDataSource.java:114)
[16:19:17] [Server thread/WARN]:    at com.zaxxer.hikari.pool.PoolBase.initializeDataSource(PoolBase.java:325)
[16:19:17] [Server thread/WARN]:    at com.zaxxer.hikari.pool.PoolBase.<init>(PoolBase.java:114)
[16:19:17] [Server thread/WARN]:    at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:108)
[16:19:17] [Server thread/WARN]:    at com.zaxxer.hikari.HikariDataSource.<init>(HikariDataSource.java:81)
[16:19:17] [Server thread/WARN]:    at me.xanium.gemseconomy.data.MySQLStorage.initialize(MySQLStorage.java:78)
[16:19:17] [Server thread/WARN]:    at me.xanium.gemseconomy.GemsEconomy.initializeDataStore(GemsEconomy.java:165)
[16:19:17] [Server thread/WARN]:    at me.xanium.gemseconomy.GemsEconomy.onEnable(GemsEconomy.java:103)
[16:19:17] [Server thread/WARN]:    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263)
[16:19:17] [Server thread/WARN]:    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:380)
[16:19:17] [Server thread/WARN]:    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:483)
[16:19:17] [Server thread/WARN]:    at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugin(CraftServer.java:501)
[16:19:17] [Server thread/WARN]:    at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugins(CraftServer.java:415)
[16:19:17] [Server thread/WARN]:    at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:227)
[16:19:17] [Server thread/WARN]:    at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:945)
[16:19:17] [Server thread/WARN]:    at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:175)
[16:19:17] [Server thread/WARN]:    at java.base/java.lang.Thread.run(Thread.java:834)
[16:19:17] [Server thread/WARN]: Caused by: java.sql.SQLException: No suitable driver
[16:19:17] [Server thread/WARN]:    at java.sql/java.sql.DriverManager.getDriver(DriverManager.java:298)
[16:19:17] [Server thread/WARN]:    at com.zaxxer.hikari.util.DriverDataSource.<init>(DriverDataSource.java:106)
[16:19:17] [Server thread/WARN]:    ... 16 more
[16:19:17] [Server thread/INFO]: [GemsEconomy] Disabling GemsEconomy v4.9.2
[16:19:17] [Server thread/ERROR]: Error occurred while disabling GemsEconomy v4.9.2 (Is it up to date?)
java.lang.NullPointerException: null
    at me.xanium.gemseconomy.GemsEconomy.onDisable(GemsEconomy.java:139) ~[?:?]
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:265) ~[1.16.5-patched.jar:git-Yatopia-staging/1.16.5-19]
    at org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(JavaPluginLoader.java:415) ~[1.16.5-patched.jar:git-Yatopia-staging/1.16.5-19]
    at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManager.java:516) ~[1.16.5-patched.jar:git-Yatopia-staging/1.16.5-19]
    at org.bukkit.plugin.SimplePluginManager.disablePlugin(SimplePluginManager.java:508) ~[1.16.5-patched.jar:git-Yatopia-staging/1.16.5-19]
    at me.xanium.gemseconomy.GemsEconomy.initializeDataStore(GemsEconomy.java:176) ~[?:?]
    at me.xanium.gemseconomy.GemsEconomy.onEnable(GemsEconomy.java:103) ~[?:?]
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[1.16.5-patched.jar:git-Yatopia-staging/1.16.5-19]
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:380) ~[1.16.5-patched.jar:git-Yatopia-staging/1.16.5-19]
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:483) ~[1.16.5-patched.jar:git-Yatopia-staging/1.16.5-19]
    at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugin(CraftServer.java:501) ~[1.16.5-patched.jar:git-Yatopia-staging/1.16.5-19]
    at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugins(CraftServer.java:415) ~[1.16.5-patched.jar:git-Yatopia-staging/1.16.5-19]
    at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:227) ~[1.16.5-patched.jar:git-Yatopia-staging/1.16.5-19]
    at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:945) ~[1.16.5-patched.jar:git-Yatopia-staging/1.16.5-19]
    at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:175) ~[1.16.5-patched.jar:git-Yatopia-staging/1.16.5-19]
    at java.lang.Thread.run(Thread.java:834) [?:?]
[16:19:17] [Server thread/ERROR]: Error occurred while enabling GemsEconomy v4.9.2 (Is it up to date?)
org.bukkit.plugin.IllegalPluginAccessException: Plugin attempted to register me.xanium.gemseconomy.listeners.EconomyListener@6842b92 while not enabled
    at org.bukkit.plugin.SimplePluginManager.registerEvents(SimplePluginManager.java:636) ~[1.16.5-patched.jar:git-Yatopia-staging/1.16.5-19]
    at me.xanium.gemseconomy.GemsEconomy.onEnable(GemsEconomy.java:105) ~[?:?]
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[1.16.5-patched.jar:git-Yatopia-staging/1.16.5-19]
    at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:380) ~[1.16.5-patched.jar:git-Yatopia-staging/1.16.5-19]
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:483) ~[1.16.5-patched.jar:git-Yatopia-staging/1.16.5-19]
    at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugin(CraftServer.java:501) ~[1.16.5-patched.jar:git-Yatopia-staging/1.16.5-19]
    at org.bukkit.craftbukkit.v1_16_R3.CraftServer.enablePlugins(CraftServer.java:415) ~[1.16.5-patched.jar:git-Yatopia-staging/1.16.5-19]
    at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:227) ~[1.16.5-patched.jar:git-Yatopia-staging/1.16.5-19]
    at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:945) ~[1.16.5-patched.jar:git-Yatopia-staging/1.16.5-19]
    at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:175) ~[1.16.5-patched.jar:git-Yatopia-staging/1.16.5-19]
    at java.lang.Thread.run(Thread.java:834) [?:?]
Xanium1 commented 3 years ago

I have not received any other people complaining about this. What do you mean by reinstalling your minecraft server? This error seems like java cannot find the JDBC driver which I've never seen before

msengbusch commented 3 years ago

First thanks for your response. With reinstalling my mc server, I meant delete all files and built it up from scratch again. But as I mentioned before either the plugins nor the configs changed. Unfortunately this exception seems to only occur at my mc server hoster. I used the same plugins and configs on my main pc and everything went perfect. Now I am going to remote debug the server at the hoster and try to find out why the JDBC drive isn't found.

msengbusch commented 3 years ago

I fixed the issue by change the java version from 8 to 11. I don't know why this happend but now the problem is fixed