MySQL could not create data source
nhanledev opened this issue ยท 5 comments
What behaviour is observed?
I run AuthMe 5.6.0 Snapshot (legacy) in Paper 1.17.1. Everything is working.
When I upgrade to AuthMe 5.6.0 Snapshot Build #2534, on Paper 1.18.2 with the same configuration file, the plugin can not load with RuntimeError about MySQL jdbc
Expected behaviour
The plugin should load without any problem with establishing mysql connection.
To Reproduce
- Install paper 1.18.2
- Install AuthMe 5.6.0 Snapshot Build #2534
- Set the backend: MYSQL and provide correct mysql credentials
- Run the server and see that AuthMe throws bugs
[13:44:29 INFO]: [AuthMe] Enabling AuthMe v5.6.0-SNAPSHOT-b2534
[13:44:29 INFO]: [AuthMe] Connection arguments loaded, Hikari ConnectionPool ready!
[13:44:29 ERROR]: [AuthMe] [STDERR] [Server thread] INFO fr.xephi.authme.libs.com.zaxxer.hikari.HikariDataSource - AuthMeMYSQLPool - Starting...
[13:44:29 WARN]: Nag author(s): '[sgdc3, ljacqu, games647, Hex3l, krusic22]' of 'AuthMe' about their usage of System.out/err.print. Please use your plugin's logger instead (JavaPlugin#getLogger).
[13:44:29 WARN]: [AuthMe] Could not create data source: [RuntimeException]: Driver fr.xephi.authme.libs.org.mariadb.jdbc.Driver claims to not accept jdbcUrl, jdbc:mysql://127.0.0.1:3306/redacted_database_name
[13:44:29 WARN]: [AuthMe] Aborting initialization of AuthMe: [IllegalStateException]: Error during initialization of data source
[13:44:29 WARN]: java.lang.IllegalStateException: Error during initialization of data source
[13:44:29 WARN]: at AuthMe-5.6.0-SNAPSHOT.jar//fr.xephi.authme.initialization.DataSourceProvider.get(DataSourceProvider.java:52)
[13:44:29 WARN]: at AuthMe-5.6.0-SNAPSHOT.jar//fr.xephi.authme.initialization.DataSourceProvider.get(DataSourceProvider.java:25)
[13:44:29 WARN]: at AuthMe-5.6.0-SNAPSHOT.jar//fr.xephi.authme.libs.ch.jalu.injector.handlers.instantiation.ProviderHandler$InstantiationByProviderClass.instantiateWith(ProviderHandler.java:129)
[13:44:29 WARN]: at AuthMe-5.6.0-SNAPSHOT.jar//fr.xephi.authme.libs.ch.jalu.injector.InjectorImpl.resolveContext(InjectorImpl.java:164)
[13:44:29 WARN]: at AuthMe-5.6.0-SNAPSHOT.jar//fr.xephi.authme.libs.ch.jalu.injector.InjectorImpl.resolve(InjectorImpl.java:133)
[13:44:29 WARN]: at AuthMe-5.6.0-SNAPSHOT.jar//fr.xephi.authme.libs.ch.jalu.injector.InjectorImpl.getSingleton(InjectorImpl.java:72)
[13:44:29 WARN]: at AuthMe-5.6.0-SNAPSHOT.jar//fr.xephi.authme.AuthMe.instantiateServices(AuthMe.java:245)
[13:44:29 WARN]: at AuthMe-5.6.0-SNAPSHOT.jar//fr.xephi.authme.AuthMe.initialize(AuthMe.java:221)
[13:44:29 WARN]: at AuthMe-5.6.0-SNAPSHOT.jar//fr.xephi.authme.AuthMe.onEnable(AuthMe.java:145)
[13:44:29 WARN]: at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264)
[13:44:29 WARN]: at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370)
[13:44:29 WARN]: at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:541)
[13:44:29 WARN]: at org.bukkit.craftbukkit.v1_18_R2.CraftServer.enablePlugin(CraftServer.java:560)
[13:44:29 WARN]: at org.bukkit.craftbukkit.v1_18_R2.CraftServer.enablePlugins(CraftServer.java:474)
[13:44:29 WARN]: at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:665)
[13:44:29 WARN]: at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:432)
[13:44:29 WARN]: at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:316)
[13:44:29 WARN]: at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1164)
[13:44:29 WARN]: at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:316)
[13:44:29 WARN]: at java.base/java.lang.Thread.run(Thread.java:833)
[13:44:29 WARN]: Caused by: java.lang.RuntimeException: Driver fr.xephi.authme.libs.org.mariadb.jdbc.Driver claims to not accept jdbcUrl, jdbc:mysql://127.0.0.1:3306/sgmc_global
[13:44:29 WARN]: at AuthMe-5.6.0-SNAPSHOT.jar//fr.xephi.authme.libs.com.zaxxer.hikari.util.DriverDataSource.<init>(DriverDataSource.java:110)
[13:44:29 WARN]: at AuthMe-5.6.0-SNAPSHOT.jar//fr.xephi.authme.libs.com.zaxxer.hikari.pool.PoolBase.initializeDataSource(PoolBase.java:331)
[13:44:29 WARN]: at AuthMe-5.6.0-SNAPSHOT.jar//fr.xephi.authme.libs.com.zaxxer.hikari.pool.PoolBase.<init>(PoolBase.java:114)
[13:44:29 WARN]: at AuthMe-5.6.0-SNAPSHOT.jar//fr.xephi.authme.libs.com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:108)
[13:44:29 WARN]: at AuthMe-5.6.0-SNAPSHOT.jar//fr.xephi.authme.libs.com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:112)
[13:44:29 WARN]: at AuthMe-5.6.0-SNAPSHOT.jar//fr.xephi.authme.datasource.MySQL.getConnection(MySQL.java:179)
[13:44:29 WARN]: at AuthMe-5.6.0-SNAPSHOT.jar//fr.xephi.authme.datasource.MySQL.checkTablesAndColumns(MySQL.java:187)
[13:44:29 WARN]: at AuthMe-5.6.0-SNAPSHOT.jar//fr.xephi.authme.datasource.MySQL.<init>(MySQL.java:77)
[13:44:29 WARN]: at AuthMe-5.6.0-SNAPSHOT.jar//fr.xephi.authme.initialization.DataSourceProvider.createDataSource(DataSourceProvider.java:67)
[13:44:29 WARN]: at AuthMe-5.6.0-SNAPSHOT.jar//fr.xephi.authme.initialization.DataSourceProvider.get(DataSourceProvider.java:49)
[13:44:29 WARN]: ... 19 more
[13:44:29 WARN]: [AuthMe] THE SERVER IS GOING TO SHUT DOWN AS DEFINED IN THE CONFIGURATION!
Plugin list
ProtolLib 4.8.0
ViaBackwards 4.3.0
ViaVersion 4.3.1
Server Implementation
BungeeCord
Database Implementation
MySQL
AuthMe Version
5.6.0 Snapshot build #2534
Error log (if applicable)
No response
Configuration
https://paste.gg/p/anonymous/fcc6e944559c47be803130a4fcc3c22e
Use fr.xephi.authme.libs.com.mysql.cj.jdbc.Driver
in the mySQLDriverClassName
configuration.
Why add a driver and ask to use it in the configuration without adding support for it?
Because the same configuration works on 1.17 legacy and it is noted in the comment section above that configuration :(
@nhanledev please try the latest dev build, make sure to set "MARIADB" as backend in your configuration
@nhanledev thank you for the feedback