summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pom.xml2
-rw-r--r--src/main/java/org/openslx/imagemaster/db/Database.java13
2 files changed, 11 insertions, 4 deletions
diff --git a/pom.xml b/pom.xml
index 6a945a7..d0f04c6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -93,7 +93,7 @@
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
- <version>6.0.6</version>
+ <version>8.0.13</version>
<scope>compile</scope>
</dependency>
<dependency>
diff --git a/src/main/java/org/openslx/imagemaster/db/Database.java b/src/main/java/org/openslx/imagemaster/db/Database.java
index cdc6fb5..710dea0 100644
--- a/src/main/java/org/openslx/imagemaster/db/Database.java
+++ b/src/main/java/org/openslx/imagemaster/db/Database.java
@@ -76,9 +76,16 @@ public class Database
try {
Class.forName( "com.mysql.cj.jdbc.Driver" ).newInstance();
- } catch ( InstantiationException | IllegalAccessException | ClassNotFoundException e ) {
- LOGGER.fatal( "Cannot get mysql JDBC driver!", e );
- System.exit( 1 );
+ } catch ( Exception e1 ) {
+ LOGGER.warn( "Cannot get mysql JDBC driver (new path)", e1 );
+ LOGGER.info( "Trying old path..." );
+ try {
+ Class.forName( "com.mysql.jdbc.Driver" ).newInstance();
+ } catch ( Exception e2 ) {
+ LOGGER.fatal( "Cannot get mysql JDBC driver (old path)", e2 );
+ LOGGER.fatal( "Bailing!" );
+ System.exit( 1 );
+ }
}
}