Skip to content

Commit cf7ebce

Browse files
committed
Fix H2 Database support.
1 parent e43bc45 commit cf7ebce

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/java/de/presti/ree6/sql/DatabaseTyp.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public enum DatabaseTyp {
3333
/**
3434
* H2 Server Database Information.
3535
*/
36-
H2_Server("jdbc:h2:tcp://%s/%s", "org.hibernate.dialect.H2Dialect", "org.h2.Driver",false);
36+
H2_Server("jdbc:h2:tcp://%s:%s/%s", "org.hibernate.dialect.H2Dialect", "org.h2.Driver",false);
3737

3838
/**
3939
* The JDBC Connection URL used by HikariCP and Hibernate.

src/main/java/de/presti/ree6/sql/SQLSession.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ public String buildConnectionURL() {
245245
databaseServerPort,
246246
databaseName);
247247

248-
case H2_Server -> jdbcUrl = getDatabaseTyp().getJdbcURL().formatted(databaseServerIP, databasePath);
248+
case H2_Server -> jdbcUrl = getDatabaseTyp().getJdbcURL().formatted(databaseServerIP, databaseServerPort, databasePath);
249249

250250
case H2 -> {
251251
if (!databasePath.startsWith(".") && !databasePath.startsWith("/") && !databasePath.startsWith("~")) {

0 commit comments

Comments
 (0)