KEYCLOAK-12724 - workaround hibernate bug - set explicitly dialect for oracle version greater than 12
This commit is contained in:
parent
8d312d748b
commit
47d6d65bbb
2 changed files with 7 additions and 2 deletions
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -581,7 +581,7 @@
|
|||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>db-allocator-db-oracle12cR1RAC</id>
|
||||
<id>db-allocator-db-oracleRAC</id>
|
||||
<properties>
|
||||
<!-- JDBC properties point to "default" JDBC driver for the particular DB -->
|
||||
<!-- For EAP testing, it is recommended to override those with system properties pointing to GAV of more appropriate JDBC driver -->
|
||||
|
@ -589,7 +589,7 @@
|
|||
<jdbc.mvn.groupId>com.oracle</jdbc.mvn.groupId>
|
||||
<jdbc.mvn.artifactId>ojdbc8</jdbc.mvn.artifactId>
|
||||
<jdbc.mvn.version>12.2.0.1</jdbc.mvn.version>
|
||||
<dballocator.type>oracle12cR1RAC</dballocator.type>
|
||||
<dballocator.type>oracle19cRAC</dballocator.type>
|
||||
<dballocator.skip>false</dballocator.skip>
|
||||
</properties>
|
||||
</profile>
|
||||
|
|
Loading…
Reference in a new issue