Résolu [Java]Problème avec HikariCP

  • Auteur de la discussion Auteur de la discussion Kenda
  • Date de début Date de début

Kenda

Architecte en herbe
16 Juillet 2016
316
1
2
125
32
www.youtube.com
Bonjour,
Je suis en train de me remettre un peu au dev Java pour un projet perso, et j'avais envie de changer de méthode pour mes connexions à la base de données. J'utilisais un vieux système qui date un peu aujourd'hui, et je voulais me penché sur HikariCP qui serait plus stable.
Sauf que, impossible de trouver une lib "fonctionnel" sur internet et/ou quand ça marche, le serveur plante quand même.

J'ai cette erreur de compilation:
"cannot access com.zaxxer.hikari.HikariConfig" (première ligne)
1683702786138.png


Pourtant j'ai bien importer la dépendance que j'ai trouver sur le github de hikariCP
XML:
<dependency>
            <groupId>com.zaxxer</groupId>
            <artifactId>HikariCP</artifactId>
            <version>5.0.1</version>
        </dependency>

Quelqu'un aurait une idée ? Merci :)
 
Bonjour,

Si tu as sous Java 8, il faut utiliser la version 4.0.3.


Tu devrais aussi déplacer les packages de tes dépendences pour éviter les collisions avec d'autres plugins ;
XML:
<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-shade-plugin</artifactId>
            <version>3.4.1</version>
            <executions>
                <execution>
                    <phase>package</phase>
                    <goals>
                        <goal>shade</goal>
                    </goals>
                    <configuration>
                        <relocations>
                            <relocation>
                                <pattern>com.zaxxer</pattern>
                                <shadedPattern>fr.kenda.monplugin.shaded.com.zaxxer</shadedPattern>
                            </relocation>
                        </relocations>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

Cordialement,
ShE3py
 
Bonjour,
Merci de la réponse, mais maintenant j'ai ces erreurs quand j'essaye de lancer le plugin :confused:


Bash:
[17:39:50 WARN]: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".

[17:39:50 WARN]: SLF4J: Defaulting to no-operation (NOP) logger implementation

[17:39:50 WARN]: SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

[17:39:51 ERROR]: Error occurred while enabling RushUniverseAPI v1.0-SNAPSHOT (Is it up to date?)
com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: Could not create connection to database server.
        at com.zaxxer.hikari.pool.HikariPool.throwPoolInitializationException(HikariPool.java:596) ~[?:?]
        at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:582) ~[?:?]
        at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:115) ~[?:?]
        at com.zaxxer.hikari.HikariDataSource.<init>(HikariDataSource.java:81) ~[?:?]
        at fr.kenda.rushuniverseapi.database.DatabaseAccess.setupHikariCP(DatabaseAccess.java:39) ~[?:?]
        at fr.kenda.rushuniverseapi.database.DatabaseAccess.initPool(DatabaseAccess.java:44) ~[?:?]
        at fr.kenda.rushuniverseapi.database.DatabaseManager.initAllDatabaseConnections(DatabaseManager.java:18) ~[?:?]
        at fr.kenda.rushuniverseapi.RushUniverseAPI.onEnable(RushUniverseAPI.java:15) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:292) ~[patched_1.9.4.jar:git-Paper-775]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:319) [patched_1.9.4.jar:git-Paper-775]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:407) [patched_1.9.4.jar:git-Paper-775]
        at org.bukkit.craftbukkit.v1_9_R2.CraftServer.loadPlugin(CraftServer.java:358) [patched_1.9.4.jar:git-Paper-775]
        at org.bukkit.craftbukkit.v1_9_R2.CraftServer.enablePlugins(CraftServer.java:318) [patched_1.9.4.jar:git-Paper-775]
        at org.bukkit.craftbukkit.v1_9_R2.CraftServer.reload(CraftServer.java:776) [patched_1.9.4.jar:git-Paper-775]
        at org.bukkit.Bukkit.reload(Bukkit.java:556) [patched_1.9.4.jar:git-Paper-775]
        at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:43) [patched_1.9.4.jar:git-Paper-775]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:152) [patched_1.9.4.jar:git-Paper-775]
        at org.bukkit.craftbukkit.v1_9_R2.CraftServer.dispatchCommand(CraftServer.java:665) [patched_1.9.4.jar:git-Paper-775]
        at org.bukkit.craftbukkit.v1_9_R2.CraftServer.dispatchServerCommand(CraftServer.java:628) [patched_1.9.4.jar:git-Paper-775]
        at net.minecraft.server.v1_9_R2.DedicatedServer.aL(DedicatedServer.java:441) [patched_1.9.4.jar:git-Paper-775]
        at net.minecraft.server.v1_9_R2.DedicatedServer.D(DedicatedServer.java:404) [patched_1.9.4.jar:git-Paper-775]
        at net.minecraft.server.v1_9_R2.MinecraftServer.C(MinecraftServer.java:723) [patched_1.9.4.jar:git-Paper-775]
        at net.minecraft.server.v1_9_R2.MinecraftServer.run(MinecraftServer.java:622) [patched_1.9.4.jar:git-Paper-775]
        at java.lang.Thread.run(Thread.java:833) [?:?]
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server.
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) ~[?:?]
        at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
        at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?]
        at java.lang.reflect.Constructor.newInstance(Constructor.java:480) ~[?:?]
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:404) ~[patched_1.9.4.jar:git-Paper-775]
        at com.mysql.jdbc.Util.getInstance(Util.java:387) ~[patched_1.9.4.jar:git-Paper-775]
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:919) ~[patched_1.9.4.jar:git-Paper-775]
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:898) ~[patched_1.9.4.jar:git-Paper-775]
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:887) ~[patched_1.9.4.jar:git-Paper-775]
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:862) ~[patched_1.9.4.jar:git-Paper-775]
        at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2331) ~[patched_1.9.4.jar:git-Paper-775]
        at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2084) ~[patched_1.9.4.jar:git-Paper-775]
        at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:795) ~[patched_1.9.4.jar:git-Paper-775]
        at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:44) ~[patched_1.9.4.jar:git-Paper-775]
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) ~[?:?]
        at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
        at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?]
        at java.lang.reflect.Constructor.newInstance(Constructor.java:480) ~[?:?]
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:404) ~[patched_1.9.4.jar:git-Paper-775]
        at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:400) ~[patched_1.9.4.jar:git-Paper-775]
        at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:327) ~[patched_1.9.4.jar:git-Paper-775]
        at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) ~[?:?]
        at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:364) ~[?:?]
        at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206) ~[?:?]
        at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:476) ~[?:?]
        at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561) ~[?:?]
        ... 22 more
Caused by: java.lang.NullPointerException: Cannot invoke "java.util.Map.get(Object)" because "this.serverVariables" is null
        at com.mysql.jdbc.ConnectionImpl.getServerCharset(ConnectionImpl.java:3004) ~[patched_1.9.4.jar:git-Paper-775]
        at com.mysql.jdbc.MysqlIO.sendConnectionAttributes(MysqlIO.java:1908) ~[patched_1.9.4.jar:git-Paper-775]
        at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1837) ~[patched_1.9.4.jar:git-Paper-775]
        at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1207) ~[patched_1.9.4.jar:git-Paper-775]
        at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2254) ~[patched_1.9.4.jar:git-Paper-775]
        at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2285) ~[patched_1.9.4.jar:git-Paper-775]
        at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2084) ~[patched_1.9.4.jar:git-Paper-775]
        at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:795) ~[patched_1.9.4.jar:git-Paper-775]
        at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:44) ~[patched_1.9.4.jar:git-Paper-775]
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) ~[?:?]
        at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
        at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?]
        at java.lang.reflect.Constructor.newInstance(Constructor.java:480) ~[?:?]
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:404) ~[patched_1.9.4.jar:git-Paper-775]
        at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:400) ~[patched_1.9.4.jar:git-Paper-775]
        at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:327) ~[patched_1.9.4.jar:git-Paper-775]
        at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) ~[?:?]
        at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:364) ~[?:?]
        at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206) ~[?:?]
        at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:476) ~[?:?]
        at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561) ~[?:?]
        ... 22 more
[17:39:51 INFO]: [RushUniverseAPI] Disabling RushUniverseAPI v1.0-SNAPSHOT
[17:39:51 ERROR]: Error occurred while disabling RushUniverseAPI v1.0-SNAPSHOT (Is it up to date?)
java.lang.NullPointerException: Cannot invoke "com.zaxxer.hikari.HikariDataSource.close()" because "this.hikariDataSource" is null
        at fr.kenda.rushuniverseapi.database.DatabaseAccess.closePool(DatabaseAccess.java:48) ~[?:?]
        at fr.kenda.rushuniverseapi.database.DatabaseManager.closeAllDatabaseConnections(DatabaseManager.java:23) ~[?:?]
        at fr.kenda.rushuniverseapi.RushUniverseAPI.onDisable(RushUniverseAPI.java:22) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:294) ~[patched_1.9.4.jar:git-Paper-775]
        at org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(JavaPluginLoader.java:347) [patched_1.9.4.jar:git-Paper-775]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:323) [patched_1.9.4.jar:git-Paper-775]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:407) [patched_1.9.4.jar:git-Paper-775]
        at org.bukkit.craftbukkit.v1_9_R2.CraftServer.loadPlugin(CraftServer.java:358) [patched_1.9.4.jar:git-Paper-775]
        at org.bukkit.craftbukkit.v1_9_R2.CraftServer.enablePlugins(CraftServer.java:318) [patched_1.9.4.jar:git-Paper-775]
        at org.bukkit.craftbukkit.v1_9_R2.CraftServer.reload(CraftServer.java:776) [patched_1.9.4.jar:git-Paper-775]
        at org.bukkit.Bukkit.reload(Bukkit.java:556) [patched_1.9.4.jar:git-Paper-775]
        at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:43) [patched_1.9.4.jar:git-Paper-775]
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:152) [patched_1.9.4.jar:git-Paper-775]
        at org.bukkit.craftbukkit.v1_9_R2.CraftServer.dispatchCommand(CraftServer.java:665) [patched_1.9.4.jar:git-Paper-775]
        at org.bukkit.craftbukkit.v1_9_R2.CraftServer.dispatchServerCommand(CraftServer.java:628) [patched_1.9.4.jar:git-Paper-775]
        at net.minecraft.server.v1_9_R2.DedicatedServer.aL(DedicatedServer.java:441) [patched_1.9.4.jar:git-Paper-775]
        at net.minecraft.server.v1_9_R2.DedicatedServer.D(DedicatedServer.java:404) [patched_1.9.4.jar:git-Paper-775]
        at net.minecraft.server.v1_9_R2.MinecraftServer.C(MinecraftServer.java:723) [patched_1.9.4.jar:git-Paper-775]
        at net.minecraft.server.v1_9_R2.MinecraftServer.run(MinecraftServer.java:622) [patched_1.9.4.jar:git-Paper-775]
        at java.lang.Thread.run(Thread.java:833) [?:?]
 
On dirait un problème de driver, essaye de mettre à jour mysql-connector-java ;
XML:
<dependency>
    <groupId>com.mysql</groupId>
    <artifactId>mysql-connector-j</artifactId>
    <version>8.0.33</version>
</dependency>
 
On dirait un problème de driver, essaye de mettre à jour mysql-connector-java ;
XML:
<dependency>
    <groupId>com.mysql</groupId>
    <artifactId>mysql-connector-j</artifactId>
    <version>8.0.33</version>
</dependency>
Toujours le même problème même avec la dépendances de mysql :/
 
Essaye de mettre à jour le serveur MySQL ou de downgrade le driver ;
XML:
<dependency>
    <groupId>mysql</groupId>
    <artifactId>mysql-connector-java</artifactId>
    <version>5.1.46</version>    
</dependency>
 
J'ai toujours le problème avec les mêmes erreurs :/
Je pense que je vais repasser sur les bons vieux DriverManager :/
 
Petit up (je sais pas si j'ai le droit)
Je viens de lancer mon serveur avec Java 8 (en local), et j'ai cette erreur maintenant, et qui est légèrement différente:


Code:
[16:49:42 ERROR]: Error occurred while enabling RushUniverseAPI v1.0-SNAPSHOT (Is it up to date?)
com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: Could not create connection to database server.
        at com.zaxxer.hikari.pool.HikariPool.throwPoolInitializationException(HikariPool.java:596) ~[?:?]
        at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:582) ~[?:?]
        at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:115) ~[?:?]
        at com.zaxxer.hikari.HikariDataSource.<init>(HikariDataSource.java:81) ~[?:?]
        at fr.kenda.rushuniverseapi.database.DatabaseAccess.setupHikariCP(DatabaseAccess.java:41) ~[?:?]
        at fr.kenda.rushuniverseapi.database.DatabaseAccess.initPool(DatabaseAccess.java:45) ~[?:?]
        at fr.kenda.rushuniverseapi.database.DatabaseManager.initAllDatabaseConnection(DatabaseManager.java:19) ~[?:?]
        at fr.kenda.rushuniverseapi.RushUniverseAPI.onEnable(RushUniverseAPI.java:12) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:292) ~[patched_1.9.4.jar:git-Paper-775]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:319) [patched_1.9.4.jar:git-Paper-775]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:407) [patched_1.9.4.jar:git-Paper-775]
        at org.bukkit.craftbukkit.v1_9_R2.CraftServer.loadPlugin(CraftServer.java:358) [patched_1.9.4.jar:git-Paper-775]
        at org.bukkit.craftbukkit.v1_9_R2.CraftServer.enablePlugins(CraftServer.java:318) [patched_1.9.4.jar:git-Paper-775]
        at net.minecraft.server.v1_9_R2.MinecraftServer.t(MinecraftServer.java:414) [patched_1.9.4.jar:git-Paper-775]
        at net.minecraft.server.v1_9_R2.MinecraftServer.l(MinecraftServer.java:379) [patched_1.9.4.jar:git-Paper-775]
        at net.minecraft.server.v1_9_R2.MinecraftServer.a(MinecraftServer.java:333) [patched_1.9.4.jar:git-Paper-775]
        at net.minecraft.server.v1_9_R2.DedicatedServer.init(DedicatedServer.java:272) [patched_1.9.4.jar:git-Paper-775]
        at net.minecraft.server.v1_9_R2.MinecraftServer.run(MinecraftServer.java:573) [patched_1.9.4.jar:git-Paper-775]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_202]
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server.
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_202]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_202]
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_202]
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_202]
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:404) ~[patched_1.9.4.jar:git-Paper-775]
        at com.mysql.jdbc.Util.getInstance(Util.java:387) ~[patched_1.9.4.jar:git-Paper-775]
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:919) ~[patched_1.9.4.jar:git-Paper-775]
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:898) ~[patched_1.9.4.jar:git-Paper-775]
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:887) ~[patched_1.9.4.jar:git-Paper-775]
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:862) ~[patched_1.9.4.jar:git-Paper-775]
        at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2331) ~[patched_1.9.4.jar:git-Paper-775]
        at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2084) ~[patched_1.9.4.jar:git-Paper-775]
        at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:795) ~[patched_1.9.4.jar:git-Paper-775]
        at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:44) ~[patched_1.9.4.jar:git-Paper-775]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_202]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_202]
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_202]
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_202]
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:404) ~[patched_1.9.4.jar:git-Paper-775]
        at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:400) ~[patched_1.9.4.jar:git-Paper-775]
        at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:327) ~[patched_1.9.4.jar:git-Paper-775]
        at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) ~[?:?]
        at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:364) ~[?:?]
        at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206) ~[?:?]
        at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:476) ~[?:?]
        at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561) ~[?:?]
        ... 17 more
Caused by: java.lang.NullPointerException
        at com.mysql.jdbc.ConnectionImpl.getServerCharset(ConnectionImpl.java:3004) ~[patched_1.9.4.jar:git-Paper-775]
        at com.mysql.jdbc.MysqlIO.sendConnectionAttributes(MysqlIO.java:1908) ~[patched_1.9.4.jar:git-Paper-775]
        at com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1837) ~[patched_1.9.4.jar:git-Paper-775]
        at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1207) ~[patched_1.9.4.jar:git-Paper-775]
        at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2254) ~[patched_1.9.4.jar:git-Paper-775]
        at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2285) ~[patched_1.9.4.jar:git-Paper-775]
        at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2084) ~[patched_1.9.4.jar:git-Paper-775]
        at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:795) ~[patched_1.9.4.jar:git-Paper-775]
        at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:44) ~[patched_1.9.4.jar:git-Paper-775]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_202]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_202]
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_202]
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_202]
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:404) ~[patched_1.9.4.jar:git-Paper-775]
        at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:400) ~[patched_1.9.4.jar:git-Paper-775]
        at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:327) ~[patched_1.9.4.jar:git-Paper-775]
        at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) ~[?:?]
        at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:364) ~[?:?]
        at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:206) ~[?:?]
        at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:476) ~[?:?]
        at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:561) ~[?:?]
        ... 17 more
[16:49:42 INFO]: [RushUniverseAPI] Disabling RushUniverseAPI v1.0-SNAPSHOT
[16:49:42 ERROR]: Error occurred while disabling RushUniverseAPI v1.0-SNAPSHOT (Is it up to date?)
java.lang.NullPointerException: null
        at fr.kenda.rushuniverseapi.database.DatabaseAccess.closePool(DatabaseAccess.java:49) ~[?:?]
        at fr.kenda.rushuniverseapi.database.DatabaseManager.closeAllDatabaseConnection(DatabaseManager.java:24) ~[?:?]
        at fr.kenda.rushuniverseapi.RushUniverseAPI.onDisable(RushUniverseAPI.java:17) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:294) ~[patched_1.9.4.jar:git-Paper-775]
        at org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(JavaPluginLoader.java:347) [patched_1.9.4.jar:git-Paper-775]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:323) [patched_1.9.4.jar:git-Paper-775]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:407) [patched_1.9.4.jar:git-Paper-775]
        at org.bukkit.craftbukkit.v1_9_R2.CraftServer.loadPlugin(CraftServer.java:358) [patched_1.9.4.jar:git-Paper-775]
        at org.bukkit.craftbukkit.v1_9_R2.CraftServer.enablePlugins(CraftServer.java:318) [patched_1.9.4.jar:git-Paper-775]
        at net.minecraft.server.v1_9_R2.MinecraftServer.t(MinecraftServer.java:414) [patched_1.9.4.jar:git-Paper-775]
        at net.minecraft.server.v1_9_R2.MinecraftServer.l(MinecraftServer.java:379) [patched_1.9.4.jar:git-Paper-775]
        at net.minecraft.server.v1_9_R2.MinecraftServer.a(MinecraftServer.java:333) [patched_1.9.4.jar:git-Paper-775]
        at net.minecraft.server.v1_9_R2.DedicatedServer.init(DedicatedServer.java:272) [patched_1.9.4.jar:git-Paper-775]
        at net.minecraft.server.v1_9_R2.MinecraftServer.run(MinecraftServer.java:573) [patched_1.9.4.jar:git-Paper-775]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_202]
 
C'est toujours fondamentalement la même erreur ;
Code:
com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: Could not create connection to database server.
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server.
Caused by: java.lang.NullPointerException
        at com.mysql.jdbc.ConnectionImpl.getServerCharset(ConnectionImpl.java:3004) ~[patched_1.9.4.jar:git-Paper-775]

Je suppose que ton plugin utilise le le driver de PaperSpigot mais qu'il est trop vieux par-rapport à la version de ta BDD.

Essaye un truc du style :
XML:
<dependencies>
    <dependency>
        <groupId>com.mysql</groupId>
        <artifactId>mysql-connector-j</artifactId>
        <version>8.0.33</version>
    </dependency>
</dependencies>


<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-shade-plugin</artifactId>
            <version>3.4.1</version>
            <executions>
                <execution>
                    <phase>package</phase>
                    <goals>
                        <goal>shade</goal>
                    </goals>
                    <configuration>
                        <relocations>
                            <relocation>
                                <pattern>com.mysql</pattern>
                                <shadedPattern>fr.kenda.rushuniverseapi.shaded.com.mysql</shadedPattern>
                            </relocation>
                        </relocations>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

Java:
private static void reinstallDriver() throws SQLException, ClassNotFoundException, InstantiationException, IllegalAccessException {
    final String PROTOCOL = "jdbc:mysql:";
   
    // java.sql.Driver
    // java.sql.DriverManager
    Driver installed = DriverManager.getDriver(PROTOCOL);
    DriverManager.deregisterDriver(installed);
   
   // https://github.com/mysql/mysql-connector-j/blob/7d6b0800528b6b25c68b52dc10d6c1c8429c100c/src/main/user-impl/java/com/mysql/cj/jdbc/Driver.java#L50-L57
    Class.forName("fr.kenda.rushuniverseapi.shaded.com.mysql.cj.jdbc.Driver").newInstance();
}

Avant ton DatabaseAccess#setupHikariCP().
 
Je vais essayer ce soir :)

Edit;:

Je viens d'essayer, et j'ai cette erreur maintenant :/


Code:
[19:16:08 ERROR]: Error occurred while enabling RushUniverseAPI v1.0-SNAPSHOT (Is it up to date?)
java.lanat fr.kenda.rushuniverseapi.database.DatabaseAccess.initPool(DatabaseAccess.java:61) ~[?:?]
        at fr.kenda.rushuniverseapi.database.DatabaseManager.initAllDatabaseConnection(DatabaseManager.java:19) ~[?:?]
        at fr.kenda.rushuniverseapi.RushUniverseAPI.onEnable(RushUniverseAPI.java:12) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:292) ~[patched_1.9.4.jar:git-Paper-775]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:319) [patched_1.9.4.jar:git-Paper-775]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:407) [patched_1.9.4.jar:git-Paper-775]
        at org.bukkit.craftbukkit.v1_9_R2.CraftServer.loadPlugin(CraftServer.java:358) [patched_1.9.4.jar:git-Paper-775]
        at org.bukkit.craftbukkit.v1_9_R2.CraftServer.enablePlugins(CraftServer.java:318) [patched_1.9.4.jar:git-Paper-775]
        at net.minecraft.server.v1_9_R2.MinecraftServer.t(MinecraftServer.java:414) [patched_1.9.4.jar:git-Paper-775]
        at net.minecraft.server.v1_9_R2.MinecraftServer.l(MinecraftServer.java:379) [patched_1.9.4.jar:git-Paper-775]
        at net.minecraft.server.v1_9_R2.MinecraftServer.a(MinecraftServer.java:333) [patched_1.9.4.jar:git-Paper-775]
        at net.minecraft.server.v1_9_R2.DedicatedServer.init(DedicatedServer.java:272) [patched_1.9.4.jar:git-Paper-775]
        at net.minecraft.server.v1_9_R2.MinecraftServer.run(MinecraftServer.java:573) [patched_1.9.4.jar:git-Paper-775]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_202]
Caused by: java.sql.SQLException: No suitable driver
        at java.sql.DriverManager.getDriver(DriverManager.java:315) ~[?:1.8.0_202]
        at fr.kenda.rushuniverseapi.database.DatabaseAccess.reinstallDriver(DatabaseAccess.java:51) ~[?:?]
        at fr.kenda.rushuniverseapi.database.DatabaseAccess.initPool(DatabaseAccess.java:59) ~[?:?]
        ... 13 more
[19:16:08 INFO]: [RushUniverseAPI] Disabling RushUniverseAPI v1.0-SNAPSHOT
[19:16:08 ERROR]: Error occurred while disabling RushUniverseAPI v1.0-SNAPSHOT (Is it up to date?)
java.lang.NullPointerException: null
        at fr.kenda.rushuniverseapi.database.DatabaseAccess.closePool(DatabaseAccess.java:67) ~[?:?]
        at fr.kenda.rushuniverseapi.database.DatabaseManager.closeAllDatabaseConnection(DatabaseManager.java:24) ~[?:?]
        at fr.kenda.rushuniverseapi.RushUniverseAPI.onDisable(RushUniverseAPI.java:17) ~[?:?]
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:294) ~[patched_1.9.4.jar:git-Paper-775]
        at org.bukkit.plugin.java.JavaPluginLoader.disablePlugin(JavaPluginLoader.java:347) [patched_1.9.4.jar:git-Paper-775]
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:323) [patched_1.9.4.jar:git-Paper-775]
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:407) [patched_1.9.4.jar:git-Paper-775]
        at org.bukkit.craftbukkit.v1_9_R2.CraftServer.loadPlugin(CraftServer.java:358) [patched_1.9.4.jar:git-Paper-775]
        at org.bukkit.craftbukkit.v1_9_R2.CraftServer.enablePlugins(CraftServer.java:318) [patched_1.9.4.jar:git-Paper-775]
        at net.minecraft.server.v1_9_R2.MinecraftServer.t(MinecraftServer.java:414) [patched_1.9.4.jar:git-Paper-775]
        at net.minecraft.server.v1_9_R2.MinecraftServer.l(MinecraftServer.java:379) [patched_1.9.4.jar:git-Paper-775]
        at net.minecraft.server.v1_9_R2.MinecraftServer.a(MinecraftServer.java:333) [patched_1.9.4.jar:git-Paper-775]
        at net.minecraft.server.v1_9_R2.DedicatedServer.init(DedicatedServer.java:272) [patched_1.9.4.jar:git-Paper-775]
        at net.minecraft.server.v1_9_R2.MinecraftServer.run(MinecraftServer.java:573) [patched_1.9.4.jar:git-Paper-775]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_202]
 
Dernière édition: