FastLogin icon indicating copy to clipboard operation
FastLogin copied to clipboard

Failed to load driver class com.mysql.cj.jdbc.Driver

Open Laxeeee opened this issue 1 year ago • 5 comments

What happened?

Hi how i can fix this?

[fastlogin.hikari.HikariConfig]: Failed to load driver class com.mysql.cj.jdbc.Driver from HikariConfig class classloader com.velocitypowered.proxy.plugin.PluginClassLoader@62566842 [15:10:02 ERROR]: Couldn't pass ProxyInitializeEvent to fastlogin java.lang.RuntimeException: Failed to load driver class com.mysql.cj.jdbc.Driver in either of HikariConfig class loader or Thread context classloader at fastlogin.hikari.HikariConfig.setDriverClassName(HikariConfig.java:491) ~[?:?] at com.github.games647.fastlogin.core.storage.MySQLStorage.setParams(MySQLStorage.java:49) ~[?:?] at com.github.games647.fastlogin.core.storage.MySQLStorage.(MySQLStorage.java:42) ~[?:?] at com.github.games647.fastlogin.core.shared.FastLoginCore.setupDatabase(FastLoginCore.java:250) ~[?:?] at com.github.games647.fastlogin.velocity.FastLoginVelocity.onProxyInitialization(FastLoginVelocity.java:100) ~[?:?] at com.github.games647.fastlogin.velocity.Lmbda$1.execute(Unknown Source) ~[?:?] at com.velocitypowered.proxy.event.UntargetedEventHandler$VoidHandler.lambda$buildHandler$0(UntargetedEventHandler.java:56) ~[velocity.jar:3.2.0-SNAPSHOT (git-f884e049-b275)] at com.velocitypowered.proxy.event.VelocityEventManager.fire(VelocityEventManager.java:597) ~[velocity.jar:3.2.0-SNAPSHOT (git-f884e049-b275)] at com.velocitypowered.proxy.event.VelocityEventManager.lambda$fire$5(VelocityEventManager.java:478) ~[velocity.jar:3.2.0-SNAPSHOT (git-f884e049-b275)] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?] at java.lang.Thread.run(Thread.java:833) [?:?]

What did you expect?

No response

Steps to reproduce

No response

Plugin list

No response

Configuration file

No response

Server log

No response

Plugin version

last one

Platform

Velocity

Relevance

  • [X] I tried the latest build (build refers to development builds not necessary a release version)

  • [ ] I checked for existing tickets - If there are, please vote them with a thumbs reaction and not create new ones

Laxeeee avatar Jan 13 '24 16:01 Laxeeee

If you are using Velocity, you need to setup the mariadb driver as mentioned in the configuration file.

TuxCoding avatar Jan 15 '24 15:01 TuxCoding

before everything worked fine

Laxeeee avatar Jan 27 '24 14:01 Laxeeee

Please post your config file

TuxCoding avatar Jan 27 '24 15:01 TuxCoding

I have something similar:

[07:57:47 ERROR]: Couldn't pass ProxyInitializeEvent to fastlogin
java.lang.NoClassDefFoundError: org/sqlite/SQLiteConfig
        at com.github.games647.fastlogin.core.storage.SQLiteStorage.setParams(SQLiteStorage.java:71) ~[?:?]
        at com.github.games647.fastlogin.core.storage.SQLiteStorage.<init>(SQLiteStorage.java:56) ~[?:?]
        at com.github.games647.fastlogin.core.shared.FastLoginCore.setupDatabase(FastLoginCore.java:232) ~[?:?]
        at com.github.games647.fastlogin.velocity.FastLoginVelocity.onProxyInitialization(FastLoginVelocity.java:100) ~[?:?]
        at com.github.games647.fastlogin.velocity.Lmbda$1.execute(Unknown Source) ~[?:?]
        at com.velocitypowered.proxy.event.UntargetedEventHandler$VoidHandler.lambda$buildHandler$0(UntargetedEventHandler.java:56) ~[velocity-3.3.0-SNAPSHOT-345.jar:3.3.0-SNAPSHOT (git-38558783-b345)]
        at com.velocitypowered.proxy.event.VelocityEventManager.fire(VelocityEventManager.java:597) ~[velocity-3.3.0-SNAPSHOT-345.jar:3.3.0-SNAPSHOT (git-38558783-b345)]
        at com.velocitypowered.proxy.event.VelocityEventManager.lambda$fire$5(VelocityEventManager.java:478) ~[velocity-3.3.0-SNAPSHOT-345.jar:3.3.0-SNAPSHOT (git-38558783-b345)]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
        at java.lang.Thread.run(Thread.java:1583) [?:?]
Caused by: java.lang.ClassNotFoundException: org.sqlite.SQLiteConfig
        at com.velocitypowered.proxy.plugin.PluginClassLoader.loadClass0(PluginClassLoader.java:87) ~[velocity-3.3.0-SNAPSHOT-345.jar:3.3.0-SNAPSHOT (git-38558783-b345)]

I also tried mysql. I understand that you are not looking for the dependencies in maven or something like that?

Edit: I try with the latest version of Velocity and latest dev build of FastLogin, with any aditional configuration

luisBazanDev avatar Jan 31 '24 13:01 luisBazanDev

The Velocity variant of FastLogin only ships for with the mariadb driver. This is referenced in the config and setup guide.

TuxCoding avatar Jan 31 '24 13:01 TuxCoding