ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akuznet...@apache.org
Subject ignite git commit: IGNITE-6476 Fixed "No suitable driver found" in demo mode.
Date Fri, 22 Sep 2017 04:30:22 GMT
Repository: ignite
Updated Branches:
  refs/heads/master 155c55a59 -> 27295f238


IGNITE-6476 Fixed "No suitable driver found" in demo mode.


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

Branch: refs/heads/master
Commit: 27295f238ffe9e7d81db955242fbd6c826717386
Parents: 155c55a
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:30:12 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/27295f23/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