ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agoncha...@apache.org
Subject [31/50] [abbrv] ignite git commit: IGNITE-6476 Fixed "No suitable driver found" in demo mode. (cherry picked from commit 27295f2)
Date Tue, 26 Sep 2017 10:48:44 GMT
IGNITE-6476 Fixed "No suitable driver found" in demo mode.
(cherry picked from commit 27295f2)


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/f08127d5
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/f08127d5
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/f08127d5

Branch: refs/heads/ignite-gg-12822
Commit: f08127d50357c49999ea24217c096f00942189ed
Parents: cd4e25e
Author: Alexey Kuznetsov <akuznetsov@apache.org>
Authored: Fri Sep 22 11:30:12 2017 +0700
Committer: Alexey Kuznetsov <akuznetsov@apache.org>
Committed: Fri Sep 22 11:31:51 2017 +0700

----------------------------------------------------------------------
 .../org/apache/ignite/console/demo/AgentMetadataDemo.java     | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/f08127d5/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/demo/AgentMetadataDemo.java
----------------------------------------------------------------------
diff --git a/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/demo/AgentMetadataDemo.java
b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/demo/AgentMetadataDemo.java
index 4683dd8..b017fb0 100644
--- a/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/demo/AgentMetadataDemo.java
+++ b/modules/web-console/web-agent/src/main/java/org/apache/ignite/console/demo/AgentMetadataDemo.java
@@ -58,6 +58,8 @@ public class AgentMetadataDemo {
             log.info("DEMO: Prepare in-memory H2 database...");
 
             try {
+                Class.forName("org.h2.Driver");
+
                 Connection conn = DriverManager.getConnection("jdbc:h2:mem:demo-db;DB_CLOSE_DELAY=-1",
"sa", "");
 
                 File sqlScript = resolvePath("demo/db-init.sql");
@@ -75,6 +77,11 @@ public class AgentMetadataDemo {
 
                 log.info("DEMO: JDBC URL for test drive metadata load: jdbc:h2:mem:demo-db");
             }
+            catch (ClassNotFoundException e) {
+                log.error("DEMO: Failed to load H2 driver!", e);
+
+                throw new SQLException("Failed to load H2 driver", e);
+            }
             catch (SQLException e) {
                 log.error("DEMO: Failed to start test drive for metadata!", e);
 


Mime
View raw message