The Oracle 23.x database driver is available and works with WebLogic Server (WLS) .
WLS 12.2.1.4.0 and 14.1.1.0.0 ship with the 19.3 version of the driver jar files. To use newer features, you could upgrade your existing installation to use the 23.x driver jar files. WLS 12.2.1.4.0 runs on JDK8 so you would need to download the JDK8 version. WLS 14.1.1.0.0 runs on JDK8 or JDK11 so you will need to decide whether you are going to use the JDK8 or JDK11 driver. If you are running on JDK11, it is recommended to use the JDK11 driver so that you get the latest JDBC 4.3 API’s that were introduced in Java SE 9.
Download Oracle 23ai Database Driver Files
You can download the driver jar files from https://www.oracle.com/database/technologies/appdev/jdbc-downloads.html . Go to the 23c section of this page and the latest version will be displayed. Download either “Zipped JDBC driver (ojdbc11.jar) and Companion Jars” or “Zipped JDBC driver (ojdbc8.jar) and Companion Jars” depending on the JDK version that you will be running.
This section lists the files required to use an Oracle 23.x driver with 12.2.1.4.0 or 14.1.1.0.0 releases of WebLogic Server .
Note: These jar files must be added to the CLASSPATH used for running WebLogic Server at the head of the CLASSPATH. They must come before all of the 19.x Oracle database client jar files.
File |
Description |
ojdbc8.jar or ojdbc11.jar | Oracle JDBC Driver |
simplefan.jar |
Fast Application Notification |
ucp.jar or ucp11.jar |
Universal Connection Pool |
ons.jar |
Oracle Network Server client |
orai18n.jar |
Internationalization support |
oraclepki.jar |
Oracle Wallet support |
xdb.jar |
SQLXML support |
xmlparserv2_sans_jaxp_services.jar | SQLXML support |
Note: In earlier documents, instructions included installation of aqjms.jar to run with AQJMS, and orai18n-collation.jar and orai18n-mapping.jar for XML processing, These jar files are not available in the JDBC Driver & UCP Downloads. If you need one of these jar files, you will need to install the Oracle Database client, the Administrator package client installation, or a full database installation to get the jar files and add them to the CLASSPATH.
Update the WebLogic Server CLASSPATH or PRE_CLASSPATH
To use an Oracle 23.x JDBC driver, you must update the CLASSPATH in your WebLogic Server environment. Prepend the required files specified in Required Oracle 23.x Driver Files listed above to the CLASSPATH (before the 19.x Driver jar files). If you are using startWebLogic.sh, you also need to set the PRE_CLASSPATH. The following code sample outlines a simple shell script that updates the CLASSPATH of your WebLogic environment. Make sure ORACLE23 is set appropriately to the directory where the files were unpackaged (or hard-code it into the script).
#!/bin/sh
# source this file in to add the new 23.x jar files at the beginning of the CLASSPATH
case “`uname`” in
*CYGWIN*)
SEP=”;”
;;
Windows_NT)
SEP=”;”
;;
*)
SEP=”:”
;;
esac
dir=${ORACLE23:?}
ojdbc=ojdbc8.jar
ucp=ucp.jar
#uncomment the next two lines to use JDK11 jars
#ojdbc=ojdbc11.jar
#ucp=ucp11.jar
CLASSPATH=”${dir}/${ojdbc}${SEP}$CLASSPATH”
CLASSPATH=”${dir}/${ucp}${SEP}$CLASSPATH”
CLASSPATH=”${dir}/simplefan.jar${SEP}$CLASSPATH”
CLASSPATH=”${dir}/ons.jar${SEP}$CLASSPATH”
CLASSPATH=”${dir}/orai18n.jar${SEP}$CLASSPATH”
CLASSPATH=”${dir}/oraclepki.jar ${SEP}$CLASSPATH”
CLASSPATH=”${dir}/xdb.jar${SEP}$CLASSPATH”
CLASSPATH=”${dir}/xmlparserv2_sans_jaxp_services.jar${SEP}$CLASSPATH”
For example, save this script in your environment with the name setdb23_jars.sh and run
. ./setdb23_jars.sh
export PRE_CLASSPATH=”$CLASSPATH”
Do NOT put the dms.jar in the CLASSPATH for WLS. Having dms.jar in the classpath will change the behavior of Connection.setClientInfo() and should only be used in Oracle Fusion Middleware environments. Also, do NOT use xmlparserv2.jar as it will collide with other jars in the WLS classpath.
There is no longer an ojdbc*g.jar file specific for debugging and no longer ojdbc*dms.jar for diagnostics (diagnostics behavior is enabled by having dms.jar in the classpath).
Upward Compatibility
Driver Change in Behavior
Driver changes are described at https://download.oracle.com/otn-pub/otn_software/jdbc/23c/JDBC-UCP-ReleaseNotes-23c.txt. The following are some observed changes in WLS.
- The Boolean type used to be sent in VARNUM format before 23.x, but from 23.x it is sent as Boolean type.
But, the PLSQL and OCI on the server side still expects it to be sent as it was sent earlier.
To make PLSQL and thin driver to work together like it used to be, there is a new connection property, oracle.jdbc.sendBooleanInPLSQL,
which requires to be set as false in such conditions. This allows it to choose appropriate binder. -
Driver debugging is completely overhauled. To enable full debugging, use -Doracle.jdbc.diagnostic.enableLogging=true -Doracle.jdbc.diagnostic.enableSensitiveDiagnostics=true -Doracle.jdbc.diagnostic.permitSensitiveDiagnostics=true -Doracle.ucp.diagnostic.enableLogging=true -Djava.util.logging.config.file=./logging.config
and create ./logging.config with:
handlers = java.util.logging.ConsoleHandler oracle.jdbc.level = FINEST java.util.logging.ConsoleHandler.level = FINEST java.util.logging.ConsoleHandler.formatter = oracle.jdbc.diagnostics.OracleSimpleFormatter
or
oracle.jdbc.handlers = java.util.logging.FileHandler oracle.jdbc.level = FINEST java.util.logging.FileHandler.level = FINEST java.util.logging.FileHandler.pattern = %h/jdbc_incident_%u.log java.util.logging.FileHandler.limit = 50000 java.util.logging.FileHandler.count = 10 java.util.logging.FileHandler.formatter = oracle.jdbc.diagnostics.OracleSimpleFormatter
If you are using startWebLogic.sh, you can add these system properties to JAVA_OPTIONS.
Upward compatibility Bugs
These are fixed in WLS 14.1.2.0.0.
- Bug 36066918 – Deploying an AGL datasource that is configured with the XA replay driver and auto-ONS fails with
java.lang.AbstractMethodError.