From 6ee9ccf090c4fde33492a724d2b1917f4648fef6 Mon Sep 17 00:00:00 2001 From: Christian Beikov Date: Fri, 22 Nov 2024 16:23:36 +0100 Subject: [PATCH] HHH-18877 Switch to ojdbc17 version 23.6.0.24.10 --- .github/workflows/ci.yml | 5 ++++- databases/oracle/matrix.gradle | 2 +- docker_db.sh | 2 +- .../src/main/asciidoc/introduction/Configuration.adoc | 2 +- .../src/main/asciidoc/repositories/Configuration.adoc | 2 +- gradle/databases.gradle | 2 +- .../hibernate/community/dialect/OracleLegacyDialect.java | 4 ++-- .../main/java/org/hibernate/dialect/OracleDialect.java | 4 ++-- hibernate-ucp/hibernate-ucp.gradle | 2 +- settings.gradle | 8 ++++---- 10 files changed, 18 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 035f5734e17b..6d11dbace2af 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -146,7 +146,7 @@ jobs: fail-fast: false matrix: include: - - rdbms: oracle_atps + - rdbms: oracle_atps_tls - rdbms: oracle_db19c - rdbms: oracle_db21c - rdbms: oracle_db23c @@ -216,6 +216,9 @@ jobs: RUNID: ${{ github.run_number }} # These runners have no HOME variable set by default, we need to explicitly set it to make the build work HOME: /root + # Needed fot TFO (TCP fast open) + LD_PRELOAD: /home/opc/libtfojdbc1.so + LD_LIBRARY_PATH: /home/opc run: ./ci/build-github.sh shell: bash # Upload build scan data. diff --git a/databases/oracle/matrix.gradle b/databases/oracle/matrix.gradle index 8717850f203a..f04c44c77bd7 100644 --- a/databases/oracle/matrix.gradle +++ b/databases/oracle/matrix.gradle @@ -5,4 +5,4 @@ * See the lgpl.txt file in the root directory or . */ // Do not forget to update settings.gradle as well -jdbcDependency 'com.oracle.database.jdbc:ojdbc11:23.3.0.23.09' \ No newline at end of file +jdbcDependency 'com.oracle.database.jdbc:ojdbc17:23.6.0.24.10' \ No newline at end of file diff --git a/docker_db.sh b/docker_db.sh index 85538cd6a07a..5eb13adac21e 100755 --- a/docker_db.sh +++ b/docker_db.sh @@ -675,7 +675,7 @@ oracle_atps() { export SERVICE=$(echo $INFO | jq -r '.database' | jq -r '.service') export PASSWORD=$(echo $INFO | jq -r '.database' | jq -r '.password') - curl -k -s -X POST "https://${HOST}.oraclevcn.com:8443/ords/admin/_/sql" -H 'content-type: application/sql' -H 'accept: application/json' -basic -u admin:${PASSWORD} --data-ascii "create user hibernate_orm_test_$RUNID identified by \"Oracle_19_Password\" DEFAULT TABLESPACE DATA TEMPORARY TABLESPACE TEMP;alter user hibernate_orm_test_$RUNID quota unlimited on data;grant CREATE SESSION, RESOURCE, CREATE VIEW, CREATE SYNONYM, CREATE ANY INDEX, EXECUTE ANY TYPE to hibernate_orm_test_$RUNID;" + curl -k -s -X POST "https://${HOST}.oraclecloudapps.com/ords/admin/_/sql" -H 'content-type: application/sql' -H 'accept: application/json' -basic -u admin:${PASSWORD} --data-ascii "create user hibernate_orm_test_$RUNID identified by \"Oracle_19_Password\" DEFAULT TABLESPACE DATA TEMPORARY TABLESPACE TEMP;alter user hibernate_orm_test_$RUNID quota unlimited on data;grant CREATE SESSION, RESOURCE, CREATE VIEW, CREATE SYNONYM, CREATE ANY INDEX, EXECUTE ANY TYPE to hibernate_orm_test_$RUNID;" } oracle_atps_tls() { diff --git a/documentation/src/main/asciidoc/introduction/Configuration.adoc b/documentation/src/main/asciidoc/introduction/Configuration.adoc index 3479293aaf62..f0940c434e3c 100644 --- a/documentation/src/main/asciidoc/introduction/Configuration.adoc +++ b/documentation/src/main/asciidoc/introduction/Configuration.adoc @@ -69,7 +69,7 @@ driver for your database. | MariaDB | `org.mariadb.jdbc:mariadb-java-client:{version}` | DB2 | `com.ibm.db2:jcc:{version}` | SQL Server | `com.microsoft.sqlserver:mssql-jdbc:{version}` -| Oracle | `com.oracle.database.jdbc:ojdbc11:{version}` +| Oracle | `com.oracle.database.jdbc:ojdbc17:{version}` | H2 | `com.h2database:h2:{version}` | HSQLDB | `org.hsqldb:hsqldb:{version}` |=== diff --git a/documentation/src/main/asciidoc/repositories/Configuration.adoc b/documentation/src/main/asciidoc/repositories/Configuration.adoc index 89f0f0242b39..f9dcd23ae913 100644 --- a/documentation/src/main/asciidoc/repositories/Configuration.adoc +++ b/documentation/src/main/asciidoc/repositories/Configuration.adoc @@ -33,7 +33,7 @@ And we'll need to pick a JDBC driver: | MariaDB | `org.mariadb.jdbc:mariadb-java-client` | DB2 | `com.ibm.db2:jcc` | SQL Server | `com.microsoft.sqlserver:mssql-jdbc` -| Oracle | `com.oracle.database.jdbc:ojdbc11` +| Oracle | `com.oracle.database.jdbc:ojdbc17` | H2 | `com.h2database:h2` | HSQLDB | `org.hsqldb:hsqldb` |=== diff --git a/gradle/databases.gradle b/gradle/databases.gradle index 9e4ac21bb51d..fef1c7f294a1 100644 --- a/gradle/databases.gradle +++ b/gradle/databases.gradle @@ -210,7 +210,7 @@ ext { // // To avoid hibernate-spatial tests failure, JVM must be enabled as stated in documentation: // https://docs.oracle.com/en/cloud/paas/autonomous-database/adbsa/autonomous-oracle-java.html - 'jdbc.url' : 'jdbc:oracle:thin:@(description=(retry_count=5)(retry_delay=1)(address=(protocol=tcps)(port=1521)(host=' + dbHost + '.oraclecloud.com))(connect_data=(service_name=' + dbService + '_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))?oracle.jdbc.enableQueryResultCache=false&oracle.jdbc.thinForceDNSLoadBalancing=true&tcp.nodelay=yes', + 'jdbc.url' : 'jdbc:oracle:thin:@(description=(retry_count=5)(retry_delay=1)(address=(protocol=tcps)(port=1521)(host=' + dbHost + '.oraclecloud.com))(connect_data=(USE_TCP_FAST_OPEN=ON)(service_name=' + dbService + '_tp.adb.oraclecloud.com))(security=(ssl_server_dn_match=no)))?oracle.jdbc.enableQueryResultCache=false&oracle.jdbc.thinForceDNSLoadBalancing=true&tcp.nodelay=yes', 'jdbc.datasource' : 'oracle.jdbc.OracleDriver', // 'jdbc.datasource' : 'oracle.jdbc.datasource.impl.OracleDataSource', 'connection.init_sql' : '' diff --git a/hibernate-community-dialects/src/main/java/org/hibernate/community/dialect/OracleLegacyDialect.java b/hibernate-community-dialects/src/main/java/org/hibernate/community/dialect/OracleLegacyDialect.java index 67be120e37a1..11fcfc3cb5f1 100644 --- a/hibernate-community-dialects/src/main/java/org/hibernate/community/dialect/OracleLegacyDialect.java +++ b/hibernate-community-dialects/src/main/java/org/hibernate/community/dialect/OracleLegacyDialect.java @@ -179,8 +179,8 @@ public class OracleLegacyDialect extends Dialect { @Override protected void applyAggregateColumnCheck(StringBuilder buf, AggregateColumn aggregateColumn) { final JdbcType jdbcType = aggregateColumn.getType().getJdbcType(); - if ( dialect.getVersion().isBefore( 23, 6 ) && jdbcType.isXml() ) { - // ORA-00600 when selecting XML columns that have a check constraint was fixed in 23.6 + if ( dialect.getVersion().isBefore( 23, 7 ) && jdbcType.isXml() ) { + // ORA-00600 when selecting XML columns that have a check constraint was fixed in 23.7 return; } super.applyAggregateColumnCheck( buf, aggregateColumn ); diff --git a/hibernate-core/src/main/java/org/hibernate/dialect/OracleDialect.java b/hibernate-core/src/main/java/org/hibernate/dialect/OracleDialect.java index 9f5575a32056..932ae1d01cc4 100644 --- a/hibernate-core/src/main/java/org/hibernate/dialect/OracleDialect.java +++ b/hibernate-core/src/main/java/org/hibernate/dialect/OracleDialect.java @@ -188,8 +188,8 @@ public class OracleDialect extends Dialect { @Override protected void applyAggregateColumnCheck(StringBuilder buf, AggregateColumn aggregateColumn) { final JdbcType jdbcType = aggregateColumn.getType().getJdbcType(); - if ( dialect.getVersion().isBefore( 23, 6 ) && jdbcType.isXml() ) { - // ORA-00600 when selecting XML columns that have a check constraint was fixed in 23.6 + if ( dialect.getVersion().isBefore( 23, 7 ) && jdbcType.isXml() ) { + // ORA-00600 when selecting XML columns that have a check constraint was fixed in 23.7 return; } super.applyAggregateColumnCheck( buf, aggregateColumn ); diff --git a/hibernate-ucp/hibernate-ucp.gradle b/hibernate-ucp/hibernate-ucp.gradle index 7c5843e6ba7f..911e790a8468 100644 --- a/hibernate-ucp/hibernate-ucp.gradle +++ b/hibernate-ucp/hibernate-ucp.gradle @@ -12,7 +12,7 @@ apply from: rootProject.file( 'gradle/relocated-published-java-module.gradle' ) dependencies { implementation project( ':hibernate-core' ) implementation libs.ucp - implementation libs.ojdbc11 + implementation libs.ojdbc17 testImplementation project( ':hibernate-testing' ) } diff --git a/settings.gradle b/settings.gradle index ec779c430f19..c92a50610d2c 100644 --- a/settings.gradle +++ b/settings.gradle @@ -89,7 +89,7 @@ dependencyResolutionManagement { def hikaricpVersion = version "hikaricp", "3.2.0" def proxoolVersion = version "proxool", "0.8.3" def viburVersion = version "vibur", "25.0" - def ucpVersion = version "ucp", "23.4.0.24.05" + def ucpVersion = version "ucp", "23.6.0.24.10" def jcacheVersion = version "jcache", "1.0.0" def ehcache3Version = version "ehcache3", "3.10.8" @@ -126,7 +126,7 @@ dependencyResolutionManagement { library( "vibur", "org.vibur", "vibur-dbcp" ).versionRef( viburVersion ) library( "ucp", "com.oracle.database.jdbc", "ucp11" ).versionRef( ucpVersion ) - library( "ojdbc11", "com.oracle.database.jdbc", "ojdbc11" ).versionRef( ucpVersion ) + library( "ojdbc17", "com.oracle.database.jdbc", "ojdbc17" ).versionRef( ucpVersion ) library( "geolatte", "org.geolatte", "geolatte-geom" ).versionRef( geolatteVersion ) @@ -240,7 +240,7 @@ dependencyResolutionManagement { def mariadbVersion = version "mariadb", "3.4.0" def mssqlVersion = version "mssql", "12.4.2.jre11" def mysqlVersion = version "mysql", "8.2.0" - def oracleVersion = version "oracle", "23.4.0.24.05" + def oracleVersion = version "oracle", "23.6.0.24.10" def oracleLegacyVersion = version "oracleLegacy", "11.2.0.4" def pgsqlVersion = version "pgsql", "42.7.1" def sybaseVersion = version "sybase", "1.3.1" @@ -257,7 +257,7 @@ dependencyResolutionManagement { library( "mysql", "com.mysql", "mysql-connector-j" ).versionRef( mysqlVersion ) library( "tidb", "com.mysql", "mysql-connector-j" ).versionRef( tidbVersion ) library( "mariadb", "org.mariadb.jdbc", "mariadb-java-client" ).versionRef( mariadbVersion ) - library( "oracle", "com.oracle.database.jdbc", "ojdbc11" ).versionRef( oracleVersion ) + library( "oracle", "com.oracle.database.jdbc", "ojdbc17" ).versionRef( oracleVersion ) library( "oracleXml", "com.oracle.database.xml", "xdb" ).versionRef( oracleVersion ) library( "oracleXmlParser", "com.oracle.database.xml", "xmlparserv2" ).versionRef( oracleVersion ) library( "mssql", "com.microsoft.sqlserver", "mssql-jdbc" ).versionRef( mssqlVersion )