aikar / db

Aikar's Intuitive JDBC Database Wrapper - A clean and intuitive API for Java to remove JDBC boilerplate.
https://idb.emc.gs
MIT License
65 stars 20 forks source link

Regression for more recent mysql connectors #19

Closed MeFisto94 closed 3 years ago

MeFisto94 commented 3 years ago

This is basically a regression from https://github.com/PaperMC/Paper/issues/5473 and also kinda explained/regressed in https://github.com/NiklasEi/gamebox/issues/87

Basically if (dataSourceClassName == null) tryDataSourceClassName("com.mysql.jdbc.jdbc2.optional.MysqlDataSource"); needs an additonal statement for com.mysql.cj.jdbc.MysqlDataSource

Relevant stacktrace:

java.lang.IllegalArgumentException: either dataSource or dataSourceClassName is required
        at com.zaxxer.hikari.HikariConfig.validate(HikariConfig.java:771) ~[?:?]
        at com.zaxxer.hikari.HikariDataSource.<init>(HikariDataSource.java:69) ~[?:?]
        at co.aikar.idb.HikariPooledDatabase.<init>(HikariPooledDatabase.java:56) ~[?:?]
        at co.aikar.idb.BukkitDB.createHikariDatabase(BukkitDB.java:34) ~[?:?]
        at co.aikar.idb.BukkitDB.createHikariDatabase(BukkitDB.java:30) ~[?:?]
        at co.aikar.idb.BukkitDB.createHikariDatabase(BukkitDB.java:26) ~[?:?]
RoinujNosde commented 3 years ago

Check #18

chickeneer commented 3 years ago

The referenced PR should be merged and deployed.