From ef6649f236ecd3d35ec96a138c0735ad7a54856f Mon Sep 17 00:00:00 2001 From: Joe DiPol Date: Fri, 31 May 2024 09:32:47 -0700 Subject: [PATCH] 4.x: forward port of serial-config fix (#8814) * Update serial config for ojdbc driver (#7116) * fix serial config for oracle driver for jep-290 * fix dep name * remove ucp from dep since hikari is used * Use io.helidon.integrations.db ojdbc integration --------- Co-authored-by: Arjav Desai --- .../archetype/mp/custom/database-outputs.xml | 14 ++++++-------- .../META-INF/helidon/serial-config.properties | 1 - docs/src/main/asciidoc/mp/persistence.adoc | 17 +++++------------ examples/employee-app/pom.xml | 7 +++++-- .../cdi/datasource-hikaricp/pom.xml | 5 ++--- examples/integrations/micronaut/data/README.md | 16 ++++++++++++---- examples/integrations/oci/atp-cdi/pom.xml | 7 +++++-- .../META-INF/helidon/serial-config.properties | 17 ----------------- examples/integrations/oci/atp/pom.xml | 7 +++++-- integrations/cdi/datasource-ucp/pom.xml | 8 ++++++-- .../META-INF/helidon/serial-config.properties | 4 ++-- messaging/connectors/aq/pom.xml | 7 +++++-- 12 files changed, 53 insertions(+), 57 deletions(-) delete mode 100644 archetypes/archetypes/src/main/archetype/mp/database/files/src/main/resources/META-INF/helidon/serial-config.properties delete mode 100644 examples/integrations/oci/atp-cdi/src/main/resources/META-INF/helidon/serial-config.properties diff --git a/archetypes/archetypes/src/main/archetype/mp/custom/database-outputs.xml b/archetypes/archetypes/src/main/archetype/mp/custom/database-outputs.xml index d8b91f7fad4..359ddee62fe 100644 --- a/archetypes/archetypes/src/main/archetype/mp/custom/database-outputs.xml +++ b/archetypes/archetypes/src/main/archetype/mp/custom/database-outputs.xml @@ -330,12 +330,6 @@ docker run --rm --name mysql -p 3306:3306 \ - - ../database/files - - src/*/resources/**/serial-config.properties - - false Helidon MP application that uses the dbclient API with OracleDB database. @@ -363,11 +357,15 @@ For details on an Oracle Docker image, see https://github.com/oracle/docker-imag + + io.helidon.integrations.db + ojdbc + runtime + com.oracle.database.jdbc - ojdbc8-production + ucp runtime - pom oracle.jdbc.pool.OracleDataSource diff --git a/archetypes/archetypes/src/main/archetype/mp/database/files/src/main/resources/META-INF/helidon/serial-config.properties b/archetypes/archetypes/src/main/archetype/mp/database/files/src/main/resources/META-INF/helidon/serial-config.properties deleted file mode 100644 index 353014db54d..00000000000 --- a/archetypes/archetypes/src/main/archetype/mp/database/files/src/main/resources/META-INF/helidon/serial-config.properties +++ /dev/null @@ -1 +0,0 @@ -pattern=oracle.sql.converter.*;oracle.i18n.text.converter.* \ No newline at end of file diff --git a/docs/src/main/asciidoc/mp/persistence.adoc b/docs/src/main/asciidoc/mp/persistence.adoc index 78e0391fdf4..f5005496497 100644 --- a/docs/src/main/asciidoc/mp/persistence.adoc +++ b/docs/src/main/asciidoc/mp/persistence.adoc @@ -208,7 +208,7 @@ managed] [source,xml] ---- - com.h2database + io.helidon.integrations.db h2 runtime @@ -240,19 +240,12 @@ managed] [source,xml] ---- - com.oracle.database.jdbc - ojdbc11 - runtime + io.helidon.integrations.db + ojdbc + runtime ---- -<1> See - https://www.oracle.com/database/technologies/maven-central-guide.html[Developer's - Guide For Oracle JDBC 21c on Maven Central] for more details. -<2> The `ojdbc11` artifact - https://www.oracle.com/database/technologies/maven-central-guide.html#:~:text=ojdbc11.jar,JDK14%20and%20JDK15[implements - relevant parts of the JDBC 4.3 specification], which forms part of - Java 21, which is the Java version targeted by Helidon 4. -<3> The `scope` is `runtime`, indicating that the Oracle +<1> The `scope` is `runtime`, indicating that the Oracle JDBC driver classes will be available on the runtime classpath. === Configuration [[DS-Configuration]] diff --git a/examples/employee-app/pom.xml b/examples/employee-app/pom.xml index 4a109a3a49e..29009f7c42b 100644 --- a/examples/employee-app/pom.xml +++ b/examples/employee-app/pom.xml @@ -37,10 +37,13 @@ + + io.helidon.integrations.db + ojdbc + com.oracle.database.jdbc - ojdbc11-production - pom + ucp io.helidon.webserver diff --git a/examples/integrations/cdi/datasource-hikaricp/pom.xml b/examples/integrations/cdi/datasource-hikaricp/pom.xml index 8f90dfada21..7c4171d7cd0 100644 --- a/examples/integrations/cdi/datasource-hikaricp/pom.xml +++ b/examples/integrations/cdi/datasource-hikaricp/pom.xml @@ -51,9 +51,8 @@ - com.oracle.database.jdbc - ojdbc11-production - pom + io.helidon.integrations.db + ojdbc runtime diff --git a/examples/integrations/micronaut/data/README.md b/examples/integrations/micronaut/data/README.md index f08ff99967f..8943e6f49e9 100644 --- a/examples/integrations/micronaut/data/README.md +++ b/examples/integrations/micronaut/data/README.md @@ -61,10 +61,14 @@ curl -i http://localhost:8080/pets/s - Update ./pom.xml to replace dependency on com.h2database with following ``` + + io.helidon.integrations.db + ojdbc + runtime + com.oracle.database.jdbc - ojdbc8-production - pom + ucp runtime ``` @@ -102,10 +106,14 @@ curl -i http://localhost:8080/pets/s - Update ./pom.xml to replace dependency on com.h2database with following ``` + + io.helidon.integrations.db + ojdbc + runtime + com.oracle.database.jdbc - ojdbc8-production - pom + ucp runtime ``` diff --git a/examples/integrations/oci/atp-cdi/pom.xml b/examples/integrations/oci/atp-cdi/pom.xml index f5245d6beb9..484b2ad1778 100644 --- a/examples/integrations/oci/atp-cdi/pom.xml +++ b/examples/integrations/oci/atp-cdi/pom.xml @@ -42,10 +42,13 @@ io.helidon.integrations.cdi helidon-integrations-cdi-datasource-ucp + + io.helidon.integrations.db + ojdbc + com.oracle.database.jdbc - ojdbc11-production - pom + ucp io.helidon.integrations.oci.sdk diff --git a/examples/integrations/oci/atp-cdi/src/main/resources/META-INF/helidon/serial-config.properties b/examples/integrations/oci/atp-cdi/src/main/resources/META-INF/helidon/serial-config.properties deleted file mode 100644 index 2ef2caf1d93..00000000000 --- a/examples/integrations/oci/atp-cdi/src/main/resources/META-INF/helidon/serial-config.properties +++ /dev/null @@ -1,17 +0,0 @@ -# -# Copyright (c) 2022 Oracle and/or its affiliates. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -pattern=oracle.sql.converter.* diff --git a/examples/integrations/oci/atp/pom.xml b/examples/integrations/oci/atp/pom.xml index 5e1f3985d76..c62df627331 100644 --- a/examples/integrations/oci/atp/pom.xml +++ b/examples/integrations/oci/atp/pom.xml @@ -50,10 +50,13 @@ io.helidon.dbclient helidon-dbclient-jdbc + + io.helidon.integrations.db + ojdbc + com.oracle.database.jdbc - ojdbc11-production - pom + ucp io.helidon.config diff --git a/integrations/cdi/datasource-ucp/pom.xml b/integrations/cdi/datasource-ucp/pom.xml index 1b7c097ee77..21d36266b65 100644 --- a/integrations/cdi/datasource-ucp/pom.xml +++ b/integrations/cdi/datasource-ucp/pom.xml @@ -40,10 +40,14 @@ helidon-integrations-cdi-datasource compile + + io.helidon.integrations.db + ojdbc + compile + com.oracle.database.jdbc - ojdbc11-production - pom + ucp compile diff --git a/integrations/db/ojdbc/src/main/resources/META-INF/helidon/serial-config.properties b/integrations/db/ojdbc/src/main/resources/META-INF/helidon/serial-config.properties index 85f9e5a6de0..b91bd24519f 100644 --- a/integrations/db/ojdbc/src/main/resources/META-INF/helidon/serial-config.properties +++ b/integrations/db/ojdbc/src/main/resources/META-INF/helidon/serial-config.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2021 Oracle and/or its affiliates. +# Copyright (c) 2021, 2024 Oracle and/or its affiliates. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -14,4 +14,4 @@ # limitations under the License. # -pattern=oracle.sql.converter.* +pattern=oracle.i18n.util.builder.*;oracle.sql.converter.*;oracle.i18n.text.*;oracle.i18n.text.converter.* diff --git a/messaging/connectors/aq/pom.xml b/messaging/connectors/aq/pom.xml index 9b294994814..0b7a51a630e 100644 --- a/messaging/connectors/aq/pom.xml +++ b/messaging/connectors/aq/pom.xml @@ -61,10 +61,13 @@ com.oracle.database.messaging aqapi + + io.helidon.integrations.db + ojdbc + com.oracle.database.jdbc - ojdbc11-production - pom + ucp jakarta.transaction