The Oracle JDBC drivers jars can be used in isolation however, depending on use cases, additional/companion jars are required. Starting from 19.7.0.0 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 page 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. The Oracle JDBC driver versions that are posted on Central Maven are: 11.2.0.4, 12.2.0.1, 18.3.0.0 and its quarterly releases, 19.3.0.0 and its quarterly releases, 21.1.0.0 and its quarterly releases, and 23ai release. All the released artifacts are at this maven repository. You can always download the latest Oracle JDBC drivers and other artifacts from JDBC Download Page. You can also get the older release and quarterly updates of Oracle JDBC drivers from Oracle JDBC Drivers Archive
Artifact Name | Group Name | Artifact Description |
ojdbc8.jar | com.oracle.database.jdbc | Supports JDBC 4.2 spec and for use with JDK8 and JDK11 |
ojdbc11.jar | com.oracle.database.jdbc | Supports JDBC 4.3 spec and for use with use with JDK8, JDK11, JDK17, JDK19, and JDK21 |
ojdbc10.jar | com.oracle.database.jdbc | Supports JDBC 4.3 spec and for use with JDK 11 and JDK 17. Available only in 19c version. |
ucp.jar | com.oracle.database.jdbc | The Java Universal Connection Pool for Oracle Database |
ucp11.jar | com.oracle.database.jdbc | The Java Universal Connection Pool for Oracle Database compiled with JDK11. (Starting with 21c release). |
rsi.jar | com.oracle.database.jdbc | A dedicated path for ingesting high volume of data into Oracle database. (Starting with 21c release). |
ojdbc8dms.jar | com.oracle.database.observability | Same as ojdbc8.jar but includes Dynamic Monitoring Service (DMS) instrumentation and requires dms.jar in the classpath. (Not required if you are using 23ai) |
ojdbc11dms.jar | com.oracle.database.observability | Same as ojdbc11.jar but includes Dynamic Monitoring Service (DMS) instrumentation and requires dms.jar in the classpath. (Not required if you are using 23ai) |
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. (Not required if you are using 23ai) |
ojdbc11_g.jar | com.oracle.database.jdbc.debug | Same as ojdbc11.jar except compiled with -g option; for dev and test. (Not required if you are using 23ai) |
ojdbc8dms_g.jar | com.oracle.database.jdbc.debug | Same as ojdbc8dms.jar except compiled with -g option; for dev and test. (Not required if you are using 23ai) |
ojdbc11dms_g.jar | com.oracle.database.jdbc.debug | Same as ojdbc11dms.jar except compiled with -g option; for dev and test. (Not required if you are using 23ai) |
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. (Not required if you are using 23ai) |
osdt_core.jar | com.oracle.database.security | The core components between oraclepki.jar and osdt_cert.jar. (Not required if you are using 23ai) |
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 |
xmlparserv2_sans_jaxp_services | com.oracle.database.xml | The Oracle Database XML Parser library |
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".
The first thing is to determine which JDBC Specification and JDK you intent to use the drivers and companion jars for. Note: Starting with Oracle JDBC 23ai, ojdbc8.jar and ojdbc11.jar have diagnosability and observability capabilities built into them. So, ojdbc8-production and ojdbc11-production are the only two that customers need to pull Oracle JDBC driver along with its companion jars.
Name | Description |
ojdbc8-production, ojdbc8-debug, ojdbc8-observability, ojdbc8-observability-deb ug | Support the JDBC 4.2 Spec and can be used with JDK8 and JDK11 |
ojdbc10-production, ojdbc10-debug, ojdbc10-observability, ojdbc10-observability- debug | Support the JDBC 4.2 Spec and can be used with JDK10 and JDK 11. (Only for 19c Release) |
ojdbc11-production, ojdbc11-debug, ojdbc11-observability, ojdbc11-observability- debug | Support the JDBC 4.2 Spec and can be used with JDK11 and JDK17. Starting from 21c release. |
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 ojdbc11-production
<dependencies>
block (replace ojdbc8 with ojdbc11)
<dependencies>
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc11-production</artifactId>
<version>23.4.0.24.05</version>
<type>pom</type>
</dependency>
</dependencies>
// For building with Gradle (build.gradle)
dependencies {
// Get 23.4.0.24.05 Oracle JDBC driver (ojdbc8.jar) and other companion jars
implementation("com.oracle.database.jdbc:ojdbc11-production:23.4.0.24.05")
}
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 ojdbc11-debug. Note that this is not needed for 23ai release.
<dependencies>
block (replace ojdbc8 with ojdbc11).
<dependencies>
<dependency>
<groupId>com.oracle.database.jdbc.debug</groupId>
<artifactId>ojdbc8-debug</artifactId>
<version>19.18.0.0</version>
<type>pom</type>
</dependency>
</dependencies>
// For building with Gradle (build.gradle)
dependencies {
// Get 19.18.0.0 Oracle JDBC driver with debug (ojdbc8_g.jar) and other companion jars
implementation("com.oracle.database.jdbc.debug:ojdbc8-debug:19.18.0.0")
}
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 ojdbc11-observability. Note that this is not needed for 23ai release.
<dependencies>
block (replace ojdbc8 with ojdbc11).
<dependencies>
<dependency>
<groupId>com.oracle.database.observability</groupId>
<artifactId>ojdbc8-observability</artifactId>
<version>19.18.0.0</version>
<type>pom</type>
</dependency>
</dependencies>
// For building with Gradle (build.gradle)
dependencies {
// Get 19.18.0.0 Oracle JDBC driver with DMS (ojdbc8dms.jar) and other companion jars
implementation("com.oracle.database.observability:ojdbc8-observability:19.18.0.0")
}
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 ojdbc11-observability-debug. Note that this is not needed for 23ai release.
<dependencies>
block (replace ojdbc8 with ojdbc11).
<dependencies>
<dependency>
<groupId>com.oracle.database.jdbc.debug</groupId>
<artifactId>ojdbc8-observability-debug</artifactId>
<version>19.18.0.0</version>
<type>pom</type>
</dependency>
</dependencies>
// For building with Gradle (build.gradle)
dependencies {
// Get 19.18.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.18.0.0")
}
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.
<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>23.4.0.24.05</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc8</artifactId>
</dependency>
</dependencies>
<dependencies>
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc11</artifactId>
</dependency>
</dependencies>
// For building with Gradle (build.gradle)
dependencies {
// Get BOM file and choose Oracle JDBC driver (ojdbc11.jar)
implementation(enforcedPlatform("com.oracle.database.jdbc:ojdbc-bom:23.4.0.24.05"))
implementation("com.oracle.database.jdbc:ojdbc11")
}
<dependencies>
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc11</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 (ojdbc11.jar) and Universal Connection Pool (ucp.jar)
implementation(enforcedPlatform("com.oracle.database.jdbc:ojdbc-bom:23.4.0.24.05"))
implementation("com.oracle.database.jdbc:ojdbc11")
implementation("com.oracle.database.jdbc:ucp")
}
<dependencies>
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc11</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 (ojdbc11.jar) and Universal Connection Pool (ucp.jar)
implementation(enforcedPlatform("com.oracle.database.jdbc:ojdbc-bom:23.4.0.24.05"))
implementation("com.oracle.database.jdbc:ojdbc11")
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")
}
<dependencies>
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc11</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 (ojdbc11.jar) and Universal Connection Pool (ucp.jar)
implementation(enforcedPlatform("com.oracle.database.jdbc:ojdbc-bom:23.4.0.24.05"))
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")
}
<dependencies>
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc11</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 (ojdbc11.jar) and Universal Connection Pool (ucp.jar)
implementation(enforcedPlatform("com.oracle.database.jdbc:ojdbc-bom:23.4.0.24.05"))
implementation("com.oracle.database.jdbc:ojdbc11")
implementation("com.oracle.database.jdbc:ucp")
// Additional Jars to support XML datatype
implementation("com.oracle.database.xml:xmlparserv2")
implementation("com.oracle.database.xml:xdb")
}
<dependencies>
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc11</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 (ojdbc11.jar) and Universal Connection Pool (ucp.jar)
implementation(enforcedPlatform("com.oracle.database.jdbc:ojdbc-bom:23.4.0.24.05"))
implementation("com.oracle.database.jdbc:ojdbc11")
implementation("com.oracle.database.jdbc:ucp")
// Additional Jar to NLS support
implementation("com.oracle.database.nls:orai18n")
}
<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.18.0.0"))
implementation("com.oracle.database.observability:ojdbc8dms")
implementation("com.oracle.database.observability:dms")
}
<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.18.0.0"))
implementation("com.oracle.database.jdbc.debug:ojdbc8_g")
implementation("com.oracle.database.jdbc.debug:ojdbc8dms_g")
implementation("com.oracle.database.observability:dms")
}
<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:23.4.0.24.05"))
implementation("com.oracle.database.jdbc:ucp")
}
<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:23.4.0.24.05"))
implementation("com.oracle.database.security:oraclepki")
implementation("com.oracle.database.security:osdt_core")
implementation("com.oracle.database.security:osdt_cert")
}
<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:23.4.0.24.05"))
implementation("com.oracle.database.ha:simplefan")
}
Here is a sample on how to add Oracle JDBC driver as a dependency in your gradle project.
repositories {
// Maven Central repository
mavenCentral()
}
dependencies {
// Get the 23.4.0.24.05 Oracle JDBC driver
implementation("com.oracle.database.jdbc:ojdbc11:23.4.0.24.05")
}
dependencies {
// Get the 23.4.0.24.05 Oracle JDBC driver along with other companion jars
implementation("com.oracle.database.jdbc:ojdbc11-production:23.4.0.24.05")
}
dependencies {
// Get the 23.4.0.24.05 Oracle JDBC driver along with Universal Connection Pool using a BOM file
implementation(enforcedPlatform("com.oracle.database.jdbc:ojdbc-bom:23.4.0.24.05"))
implementation("com.oracle.database.jdbc:ojdbc11")
implementation("com.oracle.database.jdbc:ucp")
}