No results found

Your search did not match any results.

We suggest you try the following to help find what you’re looking for:

  • Check the spelling of your keyword search.
  • Use synonyms for the keyword you typed, for example, try “application” instead of “software.”
  • Try one of the popular searches shown below.
  • Start a new search.
Trending Questions
Developers Guide For Oracle JDBC 19.7.0.0 on Maven Central

Developers Guide For Oracle JDBC 19.7.0.0 on Maven Central

What are the changes in 19.7.0.0?

The Oracle JDBC drivers jars can be used in isolation however, depending on use cases, additional/companion jars are required. In this release, we move the packaging on Maven Central from pre-established dependencies between artifacts to giving Java developers a choice between "pick-and-choose" (a.k.a. DIY) using a BOM, and "pre-established" dependencies models. The goal of this doc is to help you pick the right model and the appropriate artifacts based on your use cases. Refer to Getting Started for instructions to create a maven project.

List of Artifacts (BOM)

Artifact Name Group Name Artifact Description
ojdbc8.jar com.oracle.database.jdbc Supports JDBC 4.2 spec and for use with JDK 8, JDK 9, and JDK 11
ojdbc10.jar com.oracle.database.jdbc Supports JDBC 4.3 spec and for use with JDK 10 and JDK 11
ucp.jar com.oracle.database.jdbc The Java Universal Connection Pool for Oracle & non-Oracle DBs
ojdbc8dms.jar com.oracle.database.observability Same as ojdbc8.jar but includes Dynamic Monitoring Service (DMS) instrumentation and requires dms.jar in the classpath
ojdbc10dms.jar com.oracle.database.observability Same as ojdbc10.jar but includes Dynamic Monitoring Service (DMS) instrumentation and requires dms.jar in the classpath.
dms.jar com.oracle.database.observability The Oracle Dynamic Monitoring System (i.e., observability) library
ojdbc8_g.jar com.oracle.database.jdbc.debug Same as ojdbc8.jar except compiled with -g option; for dev and test
ojdbc10_g.jar com.oracle.database.jdbc.debug Same as ojdbc10.jar except compiled with -g option; for dev and test
ojdbc8dms_g.jar com.oracle.database.jdbc.debug Same as ojdbc8dms.jar except compiled with -g option; for dev and test
ojdbc10dms_g.jar com.oracle.database.jdbc.debug Same as ojdbc10dms.jar except compiled with -g option; for dev and test
oraclepki.jar com.oracle.database.security The Oracle PKI provider used for Oracle wallets
osdt_cert.jar com.oracle.database.security The certificate management components used for Oracle Wallets
osdt_core.jar com.oracle.database.security The core components between oraclepki.jar and osdt_cert.jar
orai18n.jar com.oracle.database.nls Java classes for NLS or Internalization support
ons.jar com.oracle.database.ha Oracle Notification System (ONS) library for FAN events
simplefan.jar com.oracle.database.ha Simple Fast Application Notification (FAN) library
xdb.jar com.oracle.database.xml Support for the JDBC 4.x standard java.sql.SQLXML interface. Note: xdb6.jar is a legacy name, xdb.jar is the new name
xmlparserv2.jar com.oracle.database.xml The Oracle Database XML Parser library

Pre-established Dependencies

The pre-established model is hassle-free and gives you all the artifacts you would need for the most common use cases including: production, production with debug instrumentation, observability and observability with debug instrumentation. If you are looking for picking and choosing the artifacts from the bill of materials (BOM), please skip this section and go to "DIY using the BOM file".

Pre-established Use Cases

  • Pre-requisites: Choose the JDBC driver based on JDBC Spec and JDK version

    The first thing is to determine which JDBC Specification and JDK you intent to use the drivers and companion jars for.

    • ojdbc8-production, ojdbc8-debug, ojdbc8-observability, ojdbc8-observability-debug: these artifacts support the JDBC 4.2 Spec and can be used with JDK 8, 9, and 11
    • ojdbc10-production, ojdbc10-debug, ojdbc10-observability, ojdbc10-observability-debug: these artifacts support the JDBC 4.3 and can be used with JDK 10 and 11.
  • Use Case 1: I Want the Production Jars

    These jars are optimized for production use (development, test, deployment), no instrumentation for debugging or observabiity. Depending on the desired JDBC Spec and JDK (Pre-requisites), you have the choice between ojdbc8-production or ojdbc10-production

    • ojdbc8-production:will pull ojdbc8.jar, ucp.jar, oraclepki.jar, osdt_core.jar, osdt_cert.jar, ons.jar, simplefan.jar, xdb.jar and xmlparserv2.jar
    • ojdbc10-production: will pull ojdbc10.jar, ucp.jar, oraclepki.jar, osdt_core.jar, osdt_cert.jar, ons.jar, simplefan.jar, xdb.jar and xmlparserv2.jar
    • Add the following dependency to your your project's pom.xml under the <dependencies> block (replace ojdbc8 with ojdbc10)
    • 
      <dependencies>
        <dependency>
          <groupId>com.oracle.database.jdbc</groupId>
          <artifactId>ojdbc8-production</artifactId>
          <version>19.7.0.0</version>
          <type>pom</type>
        </dependency>
      </dependencies>
      
      
      
      // For building with Gradle (build.gradle)
      dependencies {
         // Get 19.7.0.0 Oracle JDBC driver (ojdbc8.jar) and other companion jars
         implementation("com.oracle.database.jdbc:ojdbc8-production:19.7.0.0")
      }
      
      
  • Use Case 2: I Want the Production Jars with Debug instrumentation

    These jars have been compiled with the debugging option and not destined for production use. Depending on the JDBC Spec and JDK (Pre-requisites), you have the choice between ojdbc8-debug and ojdbc10-debug

    • ojdbc8-debug: will pull ojdbc8_g.jar, ucp.jar, oraclepki.jar, osdt_core.jar, osdt_cert.jar, ons.jar, simplefan.jar, xdb.jar and xmlparserv2.jar
    • ojdbc10-debug: will pull ojdbc10_g.jar, ucp.jar, oraclepki.jar, osdt_core.jar, osdt_cert.jar, ons.jar, simplefan.jar, xdb.jar and xmlparserv2.jar
    • Add the following dependency to your your project's pom.xml under the <dependencies> block (replace ojdbc8 with ojdbc10).
    • 
      <dependencies>
        <dependency>
          <groupId>com.oracle.database.jdbc.debug</groupId>
          <artifactId>ojdbc8-debug</artifactId>
          <version>19.7.0.0</version>
          <type>pom</type>
        </dependency>
      </dependencies>
      
      
      
      // For building with Gradle (build.gradle)
      dependencies {
         // Get 19.7.0.0 Oracle JDBC driver with debug (ojdbc8_g.jar) and other companion jars
         implementation("com.oracle.database.jdbc.debug:ojdbc8-debug:19.7.0.0")
      }
      
      
  • Use Case 3: I Want the Observability Jars

    These jars have instrumentation to support Oracle's Dynamic Monitoring Service (DMS) with limited support for java.util.logging and for production use (development, test, deployment). Depending on the JDBC Spec and JDK (Pre-requisites), you have the choice between ojdbc8-observability and ojdbc10-observability

    • ojdbc8-observability: will pull ojdbc8dms.jar, dms.jar, ucp.jar, oraclepki.jar, osdt_core.jar, osdt_cert.jar, ons.jar, simplefan.jar, xdb.jar and xmlparserv2.jar
    • ojdbc10-observability: will pull ojdbc10dms.jar, dms.jar, ucp.jar, oraclepki.jar, osdt_core.jar, osdt_cert.jar, ons.jar, simplefan.jar, xdb.jar and xmlparserv2.jar
    • Add the following dependency to your your project's pom.xml under the <dependencies> block (replace ojdbc8 with ojdbc10).
    • 
      <dependencies>
        <dependency>
          <groupId>com.oracle.database.observability</groupId>
          <artifactId>ojdbc8-observability</artifactId>
          <version>19.7.0.0</version>
          <type>pom</type>
        </dependency>
      </dependencies>
      
      
      
      // For building with Gradle (build.gradle)
      dependencies {
         // Get 19.7.0.0 Oracle JDBC driver with DMS (ojdbc8dms.jar) and other companion jars
         implementation("com.oracle.database.observability:ojdbc8-observability:19.7.0.0")
      }
      
      
  • Use Case 4: I Want the Observability Jars with Debug Instrumentation

    These jars have been compiled with the debugging option and instrumented to support Oracle's Dynamic Monitoring Service (DMS) with limited support for java.util.logging (see the JDBC doc for more details). These jars are not destined for production use. Depending on the JDBC Spec and JDK (Use Case 1), you have the choice between ojdbc8-observability-debug and ojdbc10-observability-debug

    • ojdbc8-observability-debug: will pull ojdbc8dms_g.jar, dms.jar, ucp.jar, oraclepki.jar, osdt_core.jar, osdt_cert.jar, ons.jar, simplefan.jar, xdb.jar and xmlparserv2.jar
    • ojdbc10-observability-debug: will pull ojdbc10dms_g.jar, dms.jar, ucp.jar, oraclepki.jar, osdt_core.jar, osdt_cert.jar, ons.jar, simplefan.jar, xdb.jar and xmlparserv2.jar
    • Add the following dependency to your your project's pom.xml under the <dependencies> block (replace ojdbc8 with ojdbc10).
    • 
      <dependencies>
        <dependency>
          <groupId>com.oracle.database.jdbc.debug</groupId>
          <artifactId>ojdbc8-observability-debug</artifactId>
          <version>19.7.0.0</version>
          <type>pom</type>
         </dependency>
      </dependencies>
      
      
      
      // For building with Gradle (build.gradle)
      dependencies {
         // Get 19.7.0.0 Oracle JDBC driver with DMS and debug (ojdbc8dms_g.jar) and other companion jars
         implementation("com.oracle.database.jdbc.debug:ojdbc8-observability-debug:19.7.0.0")
      }
      
      

DIY Using the BOM file

We furnish a BOM file which defines the list of artifacts available in the release, leaving to the Java developers the liberty to pick and choose the ones they want. However, figuring out which artifacts go together for specific use cases can be overwhelming, hence a set of copy/paste dependencies recipes based on use cases. Refer to "List of Artifacts (BOM)" for a summary description of each artifact.

Pre-requisites

The developer POM.xml file requires:
(1) <dependencyManagement> block helps in resolving versions of matching direct and transitive dependencies; the keys used to find an entry in the BOM are the groupId and the artifactId. This block is same for all use cases shown next.
(2) <dependencies> block to state which dependencies from the BOM it’ll consume; See the example for using ojdbc8.jar using the BOM approach. See the use cases section for the details.

<dependencyManagement>|
  <dependencies>
    <dependency>
      <groupId>com.oracle.database.jdbc</groupId>
       <artifactId>ojdbc-bom</artifactId>
       <version>19.7.0.0</version>
       <type>pom</type>
       <scope>import</scope>
     </dependency>
  </dependencies>
</dependencyManagement>
<dependencies>
  <dependency>
    <groupId>com.oracle.database.jdbc</groupId>
    <artifactId>ojdbc8</artifactId>
   </dependency>
 </dependencies>

DIY Use Cases

The goal of this document is to furnish ready to copy-and-paste recipes for managing the artifact dependencies for typical use cases.
    Here is the list.
  • Use Case 1: I Just Want the Oracle JDBC driver
    Get either the ojdbc8.jar (supports JDBC 4.2) for use with JDK 8, 9, and 11 or the ojdbc10.jar (supports JDBC 4.3) for use with JDK 10 and 11.
    In your pom.xml file: a) Provision a 'dependencyManagement' block (copy from the pre-requisites section above) b) Provision the following 'dependencies' block for pulling ojdbc8 (or ojdbc10) artifact.
    
    <dependencies>
         <dependency>
            <groupId>com.oracle.database.jdbc</groupId>
            <artifactId>ojdbc8</artifactId>
        </dependency>
    </dependencies>
    
    
    
    // For building with Gradle (build.gradle)
    dependencies {
       // Get BOM file and choose Oracle JDBC driver (ojdbc8.jar)
      implementation(enforcedPlatform("com.oracle.database.jdbc:ojdbc-bom:19.7.0.0"))
      implementation("com.oracle.database.jdbc:ojdbc8")
    }
    
    
  • Use Case 2: I Want the JDBC driver and the Java Connection Pool
    Get the JDBC driver using ojdbc8 or ojdbc10 AND ucp artifacts.
    In your pom.xml file: a) Provision a 'dependencyManagement' block (copy from the prerequisites section above) b) Provision a 'dependencies' block for pulling ojdbc8.jar and ucp.jar
    
      <dependencies>
           <dependency>
               <groupId>com.oracle.database.jdbc</groupId>
               <artifactId>ojdbc8</artifactId>
           </dependency>
    
          <dependency>
              <groupId>com.oracle.database.jdbc</groupId>
              <artifactId>ucp</artifactId>
           </dependency>
      </dependencies>
    
    
    
    // For building with Gradle (build.gradle)
    dependencies {
       // Get BOM file and choose Oracle JDBC driver (ojdbc8.jar) and Universal Connection Pool (ucp.jar)
      implementation(enforcedPlatform("com.oracle.database.jdbc:ojdbc-bom:19.7.0.0"))
      implementation("com.oracle.database.jdbc:ojdbc8")
      implementation("com.oracle.database.jdbc:ucp")
    }
    
    
  • Use Case 3: I Want to Connect to the Autonomous Database (ATP or ADW) Cloud Services
    The Oracle Autonomous Databases include the Autonomous Transaction Processing - Shared infrastructure (ATP-S), the Autonomous Transaction Processing - Dedicated infrastructure (ATP-D), and the Autonomous DataWarehouse (ADW). You have the choice of connecting to any of these Cloud services using either Oracle Wallet or Java KeyStore (JKS) as described in this Web page . However, connecting to ATP-D is only possible from a Cloud Compute instance as explained in this blog post.
    In your pom.xml file: a) Provision a 'dependencyManagement' block (copy from the prerequisite section above) b) Provision the following 'dependencies' block
    
    <dependencies>
          <dependency>
               <groupId>com.oracle.database.jdbc</groupId>
               <artifactId>ojdbc8</artifactId>
           </dependency>
          <dependency>
              <groupId>com.oracle.database.jdbc</groupId>
              <artifactId>ucp</artifactId>
           </dependency>
    
     <dependency>
            <groupId>com.oracle.database.security</groupId>
            <artifactId>oraclepki</artifactId>
     </dependency> 
    
     <dependency>
            <groupId>com.oracle.database.security</groupId>
            <artifactId>osdt_core</artifactId>
        </dependency>
    
       <dependency>
            <groupId>com.oracle.database.security</groupId>
            <artifactId>osdt_cert</artifactId>
        </dependency>
    
    
       <dependency>
            <groupId>com.oracle.database.ha</groupId>
            <artifactId>ons</artifactId>
        </dependency>
       <dependency>
            <groupId>com.oracle.database.security</groupId>
            <artifactId>oraclepki</artifactId>
        </dependency>
    
          
      <dependency>
            <groupId>com.oracle.database.ha</groupId>
            <artifactId>simplefan</artifactId>
      </dependency>
    </dependencies>
    
    
    
    // For building with Gradle (build.gradle)
    dependencies {
       // Get BOM file and choose Oracle JDBC driver (ojdbc8.jar) and Universal Connection Pool (ucp.jar)
      implementation(enforcedPlatform("com.oracle.database.jdbc:ojdbc-bom:19.7.0.0"))
      implementation("com.oracle.database.jdbc:ojdbc8")
      implementation("com.oracle.database.jdbc:ucp")
      // Additional Jars for using Oracle Wallets 
      implementation("com.oracle.database.security:oraclepki")
      implementation("com.oracle.database.security:osdt_core")
      implementation("com.oracle.database.security:osdt_cert")
      // Additional Jars for High Availability 
      implementation("com.oracle.database.ha:ons")
      implementation("com.oracle.database.ha:simplefan")
    }
    
    
  • Use Case 4: I Want High Availability Support
    There are built-in mechanisms in Oracle driver and pools enabling Java applications to sustain planned/unplanned database outages. The High availability mechanisms in the JDBC driver, the Java connection pool and required jars are described in details in the JDBC Developers Guide, the Java Connection Pool Developers Guide and in the Java Programming with Oracle database 19c white paper (Zero Downtime section).
    In your pom.xml file: (a) Provision a 'dependencyManagement' block (copy from the prerequisite section above) (b) Provision a 'dependencies' block as follows In summary: you need the JDBC driver artifact (ojdbc8 or ojdbc10), the recommended but not mandatory connection pool (ucp) artifact, the ons artifact, and if you are not using Oracle's Java connection pool (UCP or Active Gridlink) then, the simplefan artifact.
    
    <dependencies>
      <dependency>
        <groupId>com.oracle.database.jdbc</groupId>
        <artifactId>ojdbc8</artifactId>
       </dependency>
       <dependency>
         <groupId>com.oracle.database.jdbc</groupId>
         <artifactId>ucp</artifactId>
        </dependency>
        <dependency>
          <groupId>com.oracle.database.ha</groupId>
           <artifactId>ons</artifactId>
        </dependency>
        <dependency>
          <groupId>com.oracle.database.ha</groupId>
          <artifactId>simplefan</artifactId>
        </dependency>
    </dependencies>
    
    
    
    // For building with Gradle (build.gradle)
    dependencies {
       // Get BOM file and choose Oracle JDBC driver (ojdbc8.jar) and Universal Connection Pool (ucp.jar)
      implementation(enforcedPlatform("com.oracle.database.jdbc:ojdbc-bom:19.7.0.0"))
      implementation("com.oracle.database.jdbc:ojdbc8")
      implementation("com.oracle.database.jdbc:ucp")
      // Additional Jars for High Availability 
      implementation("com.oracle.database.ha:ons")
      implementation("com.oracle.database.ha:simplefan")
    }
    
    
  • Use Case 5: I Want to Support XML Data Types Using java.sql.SQLXML
    You need to get the JDBC driver, optionally the Java connection pool (ucp) then the xdb and xmlparserv2 artifacts.
    In your pom.xml file: (a) Provision a 'dependencyManagement' block (copy from the prerequisites section above) (b) Provision a 'dependencies' block for pulling the ojdbc8 (or ojdbc10), optionally ucp, xdb and xmlparserv2 artifacts.
    
    <dependencies>
      <dependency>
        <groupId>com.oracle.database.jdbc</groupId>
        <artifactId>ojdbc8</artifactId>
       </dependency>
       <dependency>
         <groupId>com.oracle.database.jdbc</groupId>
         <artifactId>ucp</artifactId>
        </dependency>
        <dependency>
          <groupId>com.oracle.database.xml</groupId>
          <artifactId>xdb</artifactId>
        </dependency>
        <dependency>
          <groupId>com.oracle.database.xml</groupId>
          <artifactId>xmlparserv2</artifactId>
        </dependency>
    </dependencies>
    
    
    
    // For building with Gradle (build.gradle)
    dependencies {
       // Get BOM file and choose Oracle JDBC driver (ojdbc8.jar) and Universal Connection Pool (ucp.jar)
      implementation(enforcedPlatform("com.oracle.database.jdbc:ojdbc-bom:19.7.0.0"))
      implementation("com.oracle.database.jdbc:ojdbc8")
      implementation("com.oracle.database.jdbc:ucp")
      // Additional Jars to support XML datatype 
      implementation("com.oracle.database.xml:xmlparserv2")
      implementation("com.oracle.database.xml:xdb")
    }
    
    
  • Use Case 6: I Want Internationalization (NLS) Support
    The orai18n artifact furnishes the Java classes for Internationalization support.
    In your pom.xml file: (a) Provision a 'dependencyManagement' block (copy from the prerequisites section above) (b) Provision a 'dependencies' block for pulling the ojdbc8 (or ojdbc10), optionally ucp and orai18n artifacts.
    
    <dependencies>
      <dependency>
        <groupId>com.oracle.database.jdbc</groupId>
         <artifactId>ojdbc8</artifactId>
       </dependency>
        <dependency>
          <groupId>com.oracle.database.jdbc</groupId>
          <artifactId>ucp</artifactId>
         </dependency>
         <dependency>
           <groupId>com.oracle.database.nls</groupId>
           <artifactId>orai18n</artifactId>
         </dependency>
      </dependencies>
    
    
    
    // For building with Gradle (build.gradle)
    dependencies {
       // Get BOM file and choose Oracle JDBC driver (ojdbc8.jar) and Universal Connection Pool (ucp.jar)
      implementation(enforcedPlatform("com.oracle.database.jdbc:ojdbc-bom:19.7.0.0"))
      implementation("com.oracle.database.jdbc:ojdbc8")
      implementation("com.oracle.database.jdbc:ucp")
      // Additional Jar to NLS support 
      implementation("com.oracle.database.nls:orai18n")
    }
    
    
  • Use Case 7: I Want the Observability jars
    Observability is provided through the Oracle Dynamic Monitoring Services (DMS) instrumentation with limited support for java.util.logging.
    In your pom.xml file: (a) Provision a 'dependencyManagement' block (copy from the prerequisites section above) (b) Provision a 'dependencies' block for pulling the ojdbc8 (or ojdbc10), dms, ojdbc8dms (or ojdbc10dms) artifacts and optionally ucp.
    
    <dependencies>  
        
        <dependency>
          <groupId>com.oracle.database.jdbc.observability</groupId>
          <artifactId>ojdbc8dms</artifactId> 
        </dependency>
     <dependency>
          <groupId>com.oracle.database.observability</groupId> 
          <artifactId>dms</artifactId> 
        </dependency>
    </dependencies>
    
    
    
    // For building with Gradle (build.gradle)
    dependencies {
       // Get BOM file and choose Oracle JDBC driver with DMS (ojdbc8dms.jar) 
      implementation(enforcedPlatform("com.oracle.database.jdbc:ojdbc-bom:19.7.0.0"))
      implementation("com.oracle.database.observability:ojdbc8dms")
      implementation("com.oracle.database.observability:dms")
    }
    
    
  • Use Case 8: I Want the Debug jars
    The Oracle JDBC driver jars have been optimized for production and do not have instrumentation to support debugging; you need to use the debug jars for debugging purpose. ojdbc8_g.jar and ojdbc10_g.jar will pull the production jars with debugging instrumentation whereas ojdbc8dms_g.jar and ojdbc10dms_g.jar will pull the observability jars with debugging instrumentation.
    In your pom.xml file: (a) Provision a 'dependencyManagement' block (copy from the prerequisites section above) (b) Provision a 'dependencies' block for pulling the ojdbc8_g (or ojdbc10_g), dms and ojdbc8dms_g (or ojdbc10_dms_g) artifacts
    
    <dependencies>
      <dependency>     
        <groupId>com.oracle.database.jdbc.debug</groupId>
        <artifactId>ojdbc8_g</artifactId>
       </dependency>     
        <dependency>
           <groupId>com.oracle.database.observability</groupId> 
           <artifactId>dms</artifactId> 
        </dependency>
        <dependency>
          <groupId>com.oracle.database.jdbc.debug</groupId>
           <artifactId>ojdbc8dms_g</artifactId> 
         </dependency>
    </dependencies>
    
    
    
    // For building with Gradle (build.gradle)
    dependencies {
       // Get BOM file and choose Oracle JDBC driver with debug (ojdbc8_g.jar) or (ojdbc8dms_g.jar) 
      implementation(enforcedPlatform("com.oracle.database.jdbc:ojdbc-bom:19.7.0.0"))
      implementation("com.oracle.database.jdbc.debug:ojdbc8_g") 
      implementation("com.oracle.database.jdbc.debug:ojdbc8dms_g")
      implementation("com.oracle.database.observability:dms")
    }
    
    
  • Use Case 9: I Just Want the Java Connection Pool
    This use case consists of using ucp.jar with non-Oracle JDBC for non-Oracle database. As of DB 19c, UCP has a compile time dependency on Oracle JDBC; this is being fixed as we speak and will materialize in the next release (DB21c and up).
    In your pom.xml file: (a) Provision a 'dependencyManagement' block (copy from the prerequisites section above) (b) Provision a 'dependencies' block for pulling the ucp and ojdbc8 (or ojdbc10) artifacts.
    
    <dependencies>
      <dependency>
        <groupId>com.oracle.database.jdbc</groupId>
        <artifactId>ucp</artifactId>
      </dependency>
    </dependencies>
    
    
    
    // For building with Gradle (build.gradle)
    dependencies {
       // Get BOM file and choose Universal Connection Pool (ucp.jar)
      implementation(enforcedPlatform("com.oracle.database.jdbc:ojdbc-bom:19.7.0.0"))
      implementation("com.oracle.database.jdbc:ucp") 
    }
    
    
  • Use Case 10: I Only Want the Security Artifacts
    These artifacts are required for Java connectivity to the Oracle database using Oracle Wallets.
    In your pom.xml file: (a) Provision a 'dependencyManagement' block (copy from the prerequisites section above) (b) Provision a 'dependencies' block for pulling the osdt_core, osdt_cert and oraclepki artifacts.
    
    <dependencies>
      <dependency>
         <groupId>com.oracle.database.security</groupId>
         <artifactId>osdt_core</artifactId>
      </dependency>
      <dependency>
        <groupId>com.oracle.database.security</groupId>
        <artifactId>osdt_cert</artifactId>
       </dependency>
      <dependency>
         <groupId>com.oracle.database.security</groupId>
         <artifactId>oraclepki</artifactId>
       </dependency>
    </dependencies>
    
    
    
    // For building with Gradle (build.gradle)
    dependencies {
       // Get BOM file and choose Oracle Security Artifacts (oraclepki.jar, osdt_core.jar, and osdt_cert.jar)
      implementation(enforcedPlatform("com.oracle.database.jdbc:ojdbc-bom:19.7.0.0"))
      implementation("com.oracle.database.security:oraclepki") 
      implementation("com.oracle.database.security:osdt_core")
      implementation("com.oracle.database.security:osdt_cert")
    }
    
    
  • Use Case 11: I Only Want the Simplefan Artifact
    The artifact, simplefan.jar supports the Java APIs for subscribing to Fast Application Notification (FAN) events; it is required when not using the Oracle Java connection pool (ucp, Weblogic ActiveGridLink). Please note that simplefan requires ons.jar for publishing events to subscribers. In your pom.xml file: a) Provision a 'dependencyManagement' block (copy from the prerequisites section above) b) Provision a 'dependencies' block for pulling the simplefan artifact.
    
    <dependencies>
      <dependency>
         <groupId>com.oracle.database.ha</groupId>
          <artifactId>simplefan</artifactId>
        </dependency>
    </dependencies>
    
    
    
    // For building with Gradle (build.gradle)
    dependencies {
       // Get BOM file and choose Simple Fan Library (simplefan.jar)
      implementation(enforcedPlatform("com.oracle.database.jdbc:ojdbc-bom:19.7.0.0"))
      implementation("com.oracle.database.ha:simplefan") 
    }
    
    
  • Use Case 12: Other Use Cases
  • Please let us know (@kmensah) about other use cases you would want to be documented.

Gradle Dependencies

Here is a sample on how to add Oracle JDBC driver as a dependency in your gradle project.

  • Prerequisites: Make sure to have Maven as a repository in your build.gradle file.
                      
    repositories {
       // Maven Central repository
       mavenCentral()
    }
                    
                   
  • Individual Files: If you want to download only Oracle JDBC driver or other companion files individually then add the dependency for that particular artifact. The snippet below shows adding Oracle JDBC driver but, look for the groupId and artifactId for the other artifacts that you want to download from the "List of Artifacts (BOM)" section
  •                   
    dependencies {
       // Get the 19.7.0.0 Oracle JDBC driver 
        implementation("com.oracle.database.jdbc:ojdbc8:19.7.0.0")
    }
                    
                   
  • Pre-established Dependencies: If you want to download Oracle JDBC driver along with other companion jars such as ucp.jar, oraclepki.jar, osdt_core.jar, osdt_cert.jar etc., then use the following dependency. For other flavors (ojdbc8-debug, ojdbc8-observability, ojdbc8-observability-debug) refer to "Pre-established Use Cases" section
  •                   
    dependencies {
       // Get the 19.7.0.0 Oracle JDBC driver along with other companion jars
        implementation("com.oracle.database.jdbc:ojdbc8-production:19.7.0.0")
    }
                    
                   
  • Using BOM file: You can leverage a BOM (Bill of Materials) file and pick and choose the artifacts for a particular usecase. The code snippet below shows using a BOM for getting the Oracle JDBC driver along with the Universal Connection Pool (UCP). For other use cases, refer to "DIY using the BOM file" section
  •                   
    dependencies {
       // Get the 19.7.0.0 Oracle JDBC driver along with Universal Connection Pool using a BOM file
       implementation(enforcedPlatform("com.oracle.database.jdbc:ojdbc-bom:19.7.0.0"))
       implementation("com.oracle.database.jdbc:ojdbc8")
       implementation("com.oracle.database.jdbc:ucp")
    }