The answer you link to is not really relevant to your problem. The problem probably (educated guess) is that the first parameter of the constructor of SimpleJDBCConnectionPool
expects the JDBC driver name, and "org.h2.jdbc"
is not the JDBC driver name (it's "org.h2.Driver"
).
Using Class.forName("org.h2.Driver");
is no longer necessary for modern JDBC drivers. With old drivers (that don't include a file META-INF/services/java.sql.Driver
with its driver implementation(s)) using Class.forName("org.h2.Driver");
will load the driver and then the driver will register itself with java.sql.DriverManager
so it can be used to create connections.