WebLogic Server provides support for application data access and database dependent features. For more information, see "Database Interoperability" in What's New in Oracle WebLogic Server.
The 12c version of the Oracle Thin driver is installed with Oracle WebLogic Server.
ojdbc7dms.jar for JDK7
ojdbc6dms.jar for JDK 6
Note:WebLogic-branded DataDirect drivers are also installed with WebLogic Server. See Using WebLogic-branded DataDirect Drivers for more information.
In addition to the Oracle Thin Driver, the mySQL 5.1.x (
mysql-connector-java-commercial-5.1.22-bin.jar) JDBC driver is installed with WebLogic Server.
These drivers are installed in subdirectories of
$ORACLE_HOME/oracle_common/modules. The manifest in the
weblogic.jar file directly or indirectly includes these files so they load automatically when the server starts. Therefore, you do not need to add these JDBC drivers to your
CLASSPATH. For the Oracle driver, the default is to include
ojdbc7.jar. If you plan to use a different version of any of the drivers installed with WebLogic Server, see Adding or Updating JDBC Drivers.
Note:WebLogic Server includes a version of the Derby DBMS installed with the WebLogic Server examples in the
WL_HOME\common\derbydirectory. Derby is an all-Java DBMS product included in the WebLogic Server distribution solely in support of demonstrating the WebLogic Server examples. For more information about Derby, see
If you plan to use a third-party JDBC driver that is not installed with WebLogic Server, you must install the driver files by updating your
CLASSPATH with the path to the driver files. See Adding or Updating JDBC Drivers.
To add a new or update an existing JDBC driver:
If you are updating existing JDBC drivers, make backup copies of the corresponding JAR files. Drivers installed with WebLogic Server are located in subdirectories of the
In the appropriate location, add the new driver JAR. If the driver has a different name, add the new driver JAR and remove the old jar from the subdirectory. If the driver jar has the same name, replace the original JAR with the updated JAR.
Determine if you need to modify your
If the JDBC driver JAR was installed with WebLogic Server and the replacement JAR has the same name, you do not need to modify
CLASSPATH. The manifest in the
weblogic.jar file directly or indirectly includes these files so they will load automatically when the server starts.
If you are adding a new JDBC driver or updating a JDBC driver where the replacement JAR has a different name than the original JAR:
For all domains, edit the
commEnv.cmd/sh script in
/common/bin and prepend your JAR file to the
WEBLOGIC_CLASSPATH environment variable. Your JAR must be located before any client JAR files. If necessary, remove any references to the original JAR.
For a specific WebLogic Server domain, edit the
setDomainEnv.cmd/sh script in that domain's
bin directory, and prepend the JAR file to the
PRE_CLASSPATH environment variable. Your JAR must be located before any client JAR files. If necessary, remove any references to the original JAR.
setDomainEnvis designed to be sourced from other scripts, such as the
setDomainEnvshould not be called directly from within an interactive shell. Doing so can cause unpredictable issues in the domain.
For globalization support with the Oracle Thin driver, Oracle supplies the
orai18n.jar file, which replaces
nls_charset.zip. If you use character sets other than
NCHAR data in Oracle object types and collections, you must include
orai18n-mapping.jar in your
orai18n-mapping.jar are included with the WebLogic Server installation in the
\oracle_common\modules\oracle.nlsrtl_12.1.0 folder. These files are not referenced by the
weblogic.jar manifest file, so you must add them to your
CLASSPATH before they can be used.
\oracle_common\modules\oracle.jdbc_11.2.0 folder includes the
ojdbc6_g.jar (for JDK 6) file, which are the versions of the Oracle Thin driver with classes to support debugging and tracing. To use the Oracle Thin driver in debug mode, add the path to these files at the beginning of your