From b8b327cb5fc6bc0c96ba864dd5c9d6534d46681e Mon Sep 17 00:00:00 2001 From: xunliu Date: Tue, 24 Sep 2024 22:56:34 +0800 Subject: [PATCH] rollback class.forname --- .../gravitino/storage/relational/database/H2Database.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/core/src/main/java/org/apache/gravitino/storage/relational/database/H2Database.java b/core/src/main/java/org/apache/gravitino/storage/relational/database/H2Database.java index 8cf205d41f2..4214a9baeda 100644 --- a/core/src/main/java/org/apache/gravitino/storage/relational/database/H2Database.java +++ b/core/src/main/java/org/apache/gravitino/storage/relational/database/H2Database.java @@ -54,12 +54,6 @@ public String startH2Database(Config config) { String connectionUrl = constructH2URI(originalJDBCUrl, storagePath); - try { - Class.forName("org.h2.Driver"); - } catch (ClassNotFoundException e) { - throw new RuntimeException("Failed to load H2 driver.", e); - } - try (Connection connection = DriverManager.getConnection(connectionUrl, username, password); Statement statement = connection.createStatement()) { String sqlContent =