mirror of
https://github.com/AppleDash/SaneEconomy.git
synced 2024-11-26 12:05:46 +01:00
Register SQL drivers before Hikari loads
This commit is contained in:
parent
68b8f62454
commit
0db46a257e
@ -85,7 +85,11 @@ public class BukkitBootstrap extends SanePlugin implements ISaneEconomy {
|
|||||||
JarUtil.loadJar("http://central.maven.org/maven2/org/xerial/sqlite-jdbc/3.25.2/sqlite-jdbc-3.25.2.jar",
|
JarUtil.loadJar("http://central.maven.org/maven2/org/xerial/sqlite-jdbc/3.25.2/sqlite-jdbc-3.25.2.jar",
|
||||||
new File(jarsFolder, "sqlite-jdbc-3.25.2.jar"),
|
new File(jarsFolder, "sqlite-jdbc-3.25.2.jar"),
|
||||||
classLoader);
|
classLoader);
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
DriverManager.getDriver("org.sqlite.JDBC");
|
||||||
|
} catch (SQLException ignored) {
|
||||||
try {
|
try {
|
||||||
DriverManager.registerDriver((Driver) Class.forName("org.sqlite.JDBC", true, classLoader).newInstance());
|
DriverManager.registerDriver((Driver) Class.forName("org.sqlite.JDBC", true, classLoader).newInstance());
|
||||||
} catch (ClassNotFoundException | InstantiationException | SQLException ex) {
|
} catch (ClassNotFoundException | InstantiationException | SQLException ex) {
|
||||||
@ -100,7 +104,11 @@ public class BukkitBootstrap extends SanePlugin implements ISaneEconomy {
|
|||||||
JarUtil.loadJar("http://central.maven.org/maven2/mysql/mysql-connector-java/8.0.13/mysql-connector-java-8.0.13.jar",
|
JarUtil.loadJar("http://central.maven.org/maven2/mysql/mysql-connector-java/8.0.13/mysql-connector-java-8.0.13.jar",
|
||||||
new File(jarsFolder, "mysql-connector-java-8.0.13.jar"),
|
new File(jarsFolder, "mysql-connector-java-8.0.13.jar"),
|
||||||
classLoader);
|
classLoader);
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
DriverManager.getDriver("com.mysql.jdbc.Driver");
|
||||||
|
} catch (SQLException ignored) {
|
||||||
try {
|
try {
|
||||||
DriverManager.registerDriver((Driver) Class.forName("com.mysql.jdbc.Driver", true, classLoader).newInstance());
|
DriverManager.registerDriver((Driver) Class.forName("com.mysql.jdbc.Driver", true, classLoader).newInstance());
|
||||||
} catch (ClassNotFoundException | InstantiationException | SQLException ex) {
|
} catch (ClassNotFoundException | InstantiationException | SQLException ex) {
|
||||||
|
Loading…
Reference in New Issue
Block a user