Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to load driver class com.mysql.cj.jdbc.Driver in either of HikariConfig class loader or Thread context classloader #3931

Open
NuddiGaming opened this issue Jan 16, 2025 · 4 comments
Labels
Bug Issues that contain unintended behavior note: Unsupported version

Comments

@NuddiGaming
Copy link

I am trying to setup plan for a server that is hosted on PebbleHost. PebbleHost has a feature that automaticaly sets up the DB for the plugin (it changes everything needed in the config file). I get this error when loading up the server. I am using the earlier build of the plugin that works for java 8.

[10:34:41 INFO]: [Plan] Downloading MySQL Driver, this may take a while...
[10:34:41 ERROR]: [Plan] Plan-v5.4 build 1723
java.lang.RuntimeException: Failed to load driver class com.mysql.cj.jdbc.Driver in either of HikariConfig class loader or Thread context classloader
        at plan.com.zaxxer.hikari.HikariConfig.setDriverClassName(HikariConfig.java:491) ~[Plan-5.4-build-1722.1%20(1).jar:?]
        at com.djrapitops.plan.storage.database.MySQLDB.setupDataSource(MySQLDB.java:114) ~[Plan-5.4-build-1722.1%20(1).jar:?]
        at com.djrapitops.plan.storage.database.SQLDB.init(SQLDB.java:152) ~[Plan-5.4-build-1722.1%20(1).jar:?]
        at com.djrapitops.plan.storage.database.DBSystem.enable(DBSystem.java:92) ~[Plan-5.4-build-1722.1%20(1).jar:?]
        at com.djrapitops.plan.storage.database.BukkitDBSystem.enable(BukkitDBSystem.java:56) ~[Plan-5.4-build-1722.1%20(1).jar:?]
        at com.djrapitops.plan.PlanSystem.enableSystems(PlanSystem.java:201) ~[Plan-5.4-build-1722.1%20(1).jar:?]
        at com.djrapitops.plan.PlanSystem.enable(PlanSystem.java:163) ~[Plan-5.4-build-1722.1%20(1).jar:?]
        at com.djrapitops.plan.Plan.onEnable(Plan.java:77) [Plan-5.4-build-1722.1%20(1).jar:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:321) [paper-1.8.8.jar:git-PaperSpigot-"4c7641d19"]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:332) [paper-1.8.8.jar:git-PaperSpigot-"4c7641d19"]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:407) [paper-1.8.8.jar:git-PaperSpigot-"4c7641d19"]
        at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugin(CraftServer.java:359) [paper-1.8.8.jar:git-PaperSpigot-"4c7641d19"]
        at org.bukkit.craftbukkit.v1_8_R3.CraftServer.enablePlugins(CraftServer.java:318) [paper-1.8.8.jar:git-PaperSpigot-"4c7641d19"]
        at net.minecraft.server.v1_8_R3.MinecraftServer.s(MinecraftServer.java:408) [paper-1.8.8.jar:git-PaperSpigot-"4c7641d19"]
        at net.minecraft.server.v1_8_R3.MinecraftServer.k(MinecraftServer.java:372) [paper-1.8.8.jar:git-PaperSpigot-"4c7641d19"]
        at net.minecraft.server.v1_8_R3.MinecraftServer.a(MinecraftServer.java:327) [paper-1.8.8.jar:git-PaperSpigot-"4c7641d19"]
        at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:267) [paper-1.8.8.jar:git-PaperSpigot-"4c7641d19"]
        at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:563) [paper-1.8.8.jar:git-PaperSpigot-"4c7641d19"]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_292]
[10:34:41 ERROR]: [Plan] Plugin Failed to Initialize Correctly. If this issue is caused by config settings you can use /plan reload
[10:34:41 ERROR]: [Plan] This error should be reported at https://github.com/plan-player-analytics/Plan/issues
[10:34:41 INFO]: [Plan] Processing complete.
[10:34:41 INFO]: [Plan] Waiting for unfinished transactions to avoid data loss..
[10:34:41 INFO]: [Plan] Transaction queue closed.
[10:34:41 INFO]: [Plan] Player Analytics Disabled.

Plugin versions

Plan-v5.4 build 1723
Java 8
Paper 1.8.8

I am not experienced with more advanced plugins like this one so the solution might be quite easy.

@NuddiGaming NuddiGaming added the Bug Issues that contain unintended behavior label Jan 16, 2025
@AuroraLS3
Copy link
Collaborator

It looks like the MySQL driver failed to initialize, this could be due to firewall blocking download of the driver.

@AuroraLS3
Copy link
Collaborator

The problem is likely caused by Paper changing their repository URL and breaking the MySQL driver download address

@AuroraLS3
Copy link
Collaborator

AuroraLS3 commented Jan 16, 2025

You should be able to place these (both jar files) in /plugins/Plan/libraries to get it working
libraries.zip

@NuddiGaming
Copy link
Author

I added the jar files, but it still gives an error. In the config file, I can see that under "Database" it uses the port 3306, when I then look at the firewall rules it has not added anything (that I know of, might do it behind the scenes). I can only add ports that I have created (I cannot choose the port it just gives me one) and 3306 is not one of them. I have no idea if this helps in anyway.

On startup:

[15:20:00 INFO]: [Plan] Enabling Plan v5.4 build 1723
[15:20:00 INFO]: [Plan] 
[15:20:00 INFO]: [Plan]            ???
[15:20:00 INFO]: [Plan]      ???   ???
[15:20:00 INFO]: [Plan]   ????????????  Player Analytics
[15:20:00 INFO]: [Plan]   ????????????  v5.4 build 1723
[15:20:00 INFO]: [Plan] 
[15:20:00 INFO]: [Plan] Locale: 'English' by AuroraLS3
[15:20:00 INFO]: [Plan] Downloading MySQL Driver, this may take a while...
[15:20:00 ERROR]: [Plan] Plan-v5.4 build 1723
java.lang.RuntimeException: Failed to load driver class com.mysql.cj.jdbc.Driver in either of HikariConfig class loader or Thread context classloader
        at plan.com.zaxxer.hikari.HikariConfig.setDriverClassName(HikariConfig.java:491) ~[Plan-5.4-build-1722.1%20(1).jar:?]
        at com.djrapitops.plan.storage.database.MySQLDB.setupDataSource(MySQLDB.java:114) ~[Plan-5.4-build-1722.1%20(1).jar:?]
        at com.djrapitops.plan.storage.database.SQLDB.init(SQLDB.java:152) ~[Plan-5.4-build-1722.1%20(1).jar:?]
        at com.djrapitops.plan.storage.database.DBSystem.enable(DBSystem.java:92) ~[Plan-5.4-build-1722.1%20(1).jar:?]
        at com.djrapitops.plan.storage.database.BukkitDBSystem.enable(BukkitDBSystem.java:56) ~[Plan-5.4-build-1722.1%20(1).jar:?]
        at com.djrapitops.plan.PlanSystem.enableSystems(PlanSystem.java:201) ~[Plan-5.4-build-1722.1%20(1).jar:?]
        at com.djrapitops.plan.PlanSystem.enable(PlanSystem.java:163) ~[Plan-5.4-build-1722.1%20(1).jar:?]
        at com.djrapitops.plan.Plan.onEnable(Plan.java:77) [Plan-5.4-build-1722.1%20(1).jar:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:321) [paper-1.8.8.jar:git-PaperSpigot-"4c7641d19"]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:332) [paper-1.8.8.jar:git-PaperSpigot-"4c7641d19"]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:407) [paper-1.8.8.jar:git-PaperSpigot-"4c7641d19"]
        at org.bukkit.craftbukkit.v1_8_R3.CraftServer.loadPlugin(CraftServer.java:359) [paper-1.8.8.jar:git-PaperSpigot-"4c7641d19"]
        at org.bukkit.craftbukkit.v1_8_R3.CraftServer.enablePlugins(CraftServer.java:318) [paper-1.8.8.jar:git-PaperSpigot-"4c7641d19"]
        at net.minecraft.server.v1_8_R3.MinecraftServer.s(MinecraftServer.java:408) [paper-1.8.8.jar:git-PaperSpigot-"4c7641d19"]
        at net.minecraft.server.v1_8_R3.MinecraftServer.k(MinecraftServer.java:372) [paper-1.8.8.jar:git-PaperSpigot-"4c7641d19"]
        at net.minecraft.server.v1_8_R3.MinecraftServer.a(MinecraftServer.java:327) [paper-1.8.8.jar:git-PaperSpigot-"4c7641d19"]
        at net.minecraft.server.v1_8_R3.DedicatedServer.init(DedicatedServer.java:267) [paper-1.8.8.jar:git-PaperSpigot-"4c7641d19"]
        at net.minecraft.server.v1_8_R3.MinecraftServer.run(MinecraftServer.java:563) [paper-1.8.8.jar:git-PaperSpigot-"4c7641d19"]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_292]
[15:20:00 ERROR]: [Plan] Plugin Failed to Initialize Correctly. If this issue is caused by config settings you can use /plan reload
[15:20:00 ERROR]: [Plan] This error should be reported at https://github.com/plan-player-analytics/Plan/issues
[15:20:00 INFO]: [Plan] Processing complete.
[15:20:00 INFO]: [Plan] Waiting for unfinished transactions to avoid data loss..
[15:20:00 INFO]: [Plan] Transaction queue closed.
[15:20:00 INFO]: [Plan] Player Analytics Disabled.

On /plan reload:

[15:29:45 INFO]: [Plan] Processing complete.
[15:29:45 INFO]: [Plan] Player Analytics Disabled.
[15:29:45 INFO]: [Plan] 
[15:29:45 INFO]: [Plan]            ???
[15:29:45 INFO]: [Plan]      ???   ???
[15:29:45 INFO]: [Plan]   ????????????  Player Analytics
[15:29:45 INFO]: [Plan]   ????????????  v5.4 build 1723
[15:29:45 INFO]: [Plan] 
[15:29:45 INFO]: [Plan] Locale: 'English' by AuroraLS3
[15:29:45 INFO]: [Plan] Downloading MySQL Driver, this may take a while...
[15:29:45 ERROR]: [Plan] Plan-v5.4 build 1723
java.lang.RuntimeException: Failed to load driver class com.mysql.cj.jdbc.Driver in either of HikariConfig class loader or Thread context classloader
        at plan.com.zaxxer.hikari.HikariConfig.setDriverClassName(HikariConfig.java:491) ~[?:?]
        at com.djrapitops.plan.storage.database.MySQLDB.setupDataSource(MySQLDB.java:114) ~[?:?]
        at com.djrapitops.plan.storage.database.SQLDB.init(SQLDB.java:152) ~[?:?]
        at com.djrapitops.plan.storage.database.DBSystem.enable(DBSystem.java:92) ~[?:?]
        at com.djrapitops.plan.storage.database.BukkitDBSystem.enable(BukkitDBSystem.java:56) ~[?:?]
        at com.djrapitops.plan.PlanSystem.enableSystems(PlanSystem.java:201) ~[?:?]
        at com.djrapitops.plan.PlanSystem.enable(PlanSystem.java:163) ~[?:?]
        at com.djrapitops.plan.Plan.onEnable(Plan.java:77) ~[?:?]
        at com.djrapitops.plan.commands.subcommands.PluginStatusCommands.lambda$onReload$0(PluginStatusCommands.java:72) ~[?:?]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_292]
[15:29:45 ERROR]: [Plan] Plugin Failed to Initialize Correctly. If this issue is caused by config settings you can use /plan reload
[15:29:45 ERROR]: [Plan] This error should be reported at https://github.com/plan-player-analytics/Plan/issues
[15:29:45 INFO]: [Plan] Processing complete.
[15:29:45 INFO]: [Plan] Waiting for unfinished transactions to avoid data loss..
[15:29:45 INFO]: [Plan] Transaction queue closed.
[15:29:45 INFO]: [Plan] Player Analytics Disabled.
[15:29:45 INFO]: [Plan] ----------------------------------------
[15:29:45 INFO]: [Plan] New Release (5.6.2883) is available https://github.com/plan-player-analytics/Plan/releases
[15:29:45 INFO]: [Plan] ----------------------------------------

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues that contain unintended behavior note: Unsupported version
Projects
None yet
Development

No branches or pull requests

2 participants