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

MySQL could not create data source #2556

Closed
nhanledev opened this issue Jun 11, 2022 · 5 comments
Closed

MySQL could not create data source #2556

nhanledev opened this issue Jun 11, 2022 · 5 comments

Comments

@nhanledev
Copy link

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

  1. Install paper 1.18.2
  2. Install AuthMe 5.6.0 Snapshot Build #2534
  3. Set the backend: MYSQL and provide correct mysql credentials
  4. 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

@HarvelsX
Copy link
Contributor

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?

@nhanledev
Copy link
Author

Because the same configuration works on 1.17 legacy and it is noted in the comment section above that configuration :(

HarvelsX added a commit to HarvelsX/AuthMeReloaded that referenced this issue Jul 25, 2022
@sgdc3
Copy link
Member

sgdc3 commented Jul 28, 2022

@nhanledev please try the latest dev build, make sure to set "MARIADB" as backend in your configuration

@sgdc3 sgdc3 added the Status: awaiting answer Marks issues blocked by an open question to the reporter. label Jul 28, 2022
@ljacqu ljacqu added this to the 5.6.0 Release milestone Jul 30, 2022
@nhanledev
Copy link
Author

The additional of MariaDB looks good to me. It works as expected.

@sgdc3 sgdc3 closed this as completed Aug 13, 2022
@sgdc3
Copy link
Member

sgdc3 commented Aug 13, 2022

@nhanledev thank you for the feedback

@sgdc3 sgdc3 removed the Status: awaiting answer Marks issues blocked by an open question to the reporter. label Aug 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants