xunliu commented on code in PR #4948:
URL: https://github.com/apache/gravitino/pull/4948#discussion_r1771702314


##########
core/src/main/java/org/apache/gravitino/storage/relational/database/H2Database.java:
##########
@@ -54,6 +54,12 @@ public String startH2Database(Config config) {
 
     String connectionUrl = constructH2URI(originalJDBCUrl, storagePath);
 
+    try {
+      Class.forName("org.h2.Driver");

Review Comment:
   Class.forName(`org.h2.Driver`) is called to load and register the JDBC 
driver.  
   Before JDBC 4.0, Java applications needed to explicitly load the JDBC driver 
to be used, which was done by calling the `Class.forName()` method and 
providing the full class name of the driver. 
   This call causes the driver class to be loaded into the JVM, and then the 
driver class's static initializer registers the driver itself with the 
`java.sql.DriverManager` class so that the DriverManager can use it to 
establish a database connection.  Without this call, when you try to establish 
a database connection via `DriverManager.getConnection()`, the DriverManager 
may not find a suitable driver to connect to the database and therefore throws 
an exception. 



##########
integration-test-common/build.gradle.kts:
##########
@@ -54,25 +61,41 @@ dependencies {
     exclude("org.elasticsearch")
     exclude("org.elasticsearch.client")
     exclude("org.elasticsearch.plugin")
+    exclude("com.amazonaws", "aws-java-sdk-bundle")
   }
+  testImplementation(libs.apiguardian.api)
+  testImplementation(libs.bundles.metrics)
+  testImplementation(libs.junit.jupiter.params)
+  testImplementation(libs.junit.jupiter.api)
+  testImplementation(libs.junit.jupiter.engine)
+  testImplementation(libs.bundles.jersey)

Review Comment:
   DONE



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@gravitino.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to