From cfd6c66cb38bd26bbcc3a2b8c047b72884990846 Mon Sep 17 00:00:00 2001 From: Kohei Tamura Date: Wed, 25 Jan 2017 16:32:42 +0900 Subject: [PATCH] Fix "No suitable driver found" error when deploying war. --- .../java/org/t246osslab/easybuggy/utils/ApplicationUtils.java | 4 +--- src/main/resources/application.properties | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/t246osslab/easybuggy/utils/ApplicationUtils.java b/src/main/java/org/t246osslab/easybuggy/utils/ApplicationUtils.java index e264b4d6..47526670 100644 --- a/src/main/java/org/t246osslab/easybuggy/utils/ApplicationUtils.java +++ b/src/main/java/org/t246osslab/easybuggy/utils/ApplicationUtils.java @@ -37,9 +37,7 @@ public class ApplicationUtils { Logger.error(e); } try { - if (!databaseURL.startsWith("jdbc:derby:memory")) { - databaseDriver = bundle.getString("database.driver"); - } + databaseDriver = bundle.getString("database.driver"); } catch (Exception e) { Logger.error(e); } diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index cac5fce8..720b3417 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -3,6 +3,7 @@ easybuggy.port=8989 # In-memory database URL (derby) database.url=jdbc:derby:memory:demo;create=true +database.driver=org.apache.derby.jdbc.EmbeddedDriver # Local MySQL server #database.url=jdbc:mysql://localhost:3306/easybuggy?user=easybuggy&password=password