diff --git a/model/jpa/src/main/java/org/keycloak/connections/jpa/DefaultJpaConnectionProviderFactory.java b/model/jpa/src/main/java/org/keycloak/connections/jpa/DefaultJpaConnectionProviderFactory.java index 5506ceb11f..169348e8c3 100755 --- a/model/jpa/src/main/java/org/keycloak/connections/jpa/DefaultJpaConnectionProviderFactory.java +++ b/model/jpa/src/main/java/org/keycloak/connections/jpa/DefaultJpaConnectionProviderFactory.java @@ -276,6 +276,11 @@ public class DefaultJpaConnectionProviderFactory implements JpaConnectionProvide return sql2012Dialect; } } + // For Oracle19c, we may need to set dialect explicitly to workaround https://hibernate.atlassian.net/browse/HHH-13184 + if (dbProductName.equals("Oracle") && connection.getMetaData().getDatabaseMajorVersion() > 12) { + logger.debugf("Manually specify dialect for Oracle to org.hibernate.dialect.Oracle12cDialect"); + return "org.hibernate.dialect.Oracle12cDialect"; + } } catch (SQLException e) { logger.warnf("Unable to detect hibernate dialect due database exception : %s", e.getMessage()); } diff --git a/testsuite/integration-arquillian/pom.xml b/testsuite/integration-arquillian/pom.xml index c7d7f0b506..3258c88165 100644 --- a/testsuite/integration-arquillian/pom.xml +++ b/testsuite/integration-arquillian/pom.xml @@ -581,7 +581,7 @@ - db-allocator-db-oracle12cR1RAC + db-allocator-db-oracleRAC @@ -589,7 +589,7 @@ com.oracle ojdbc8 12.2.0.1 - oracle12cR1RAC + oracle19cRAC false