Create an Oracle JNDI data source on WebLogic
About this task
Guidewire bundles the supported version of the Oracle JDBC Thin Driver in the ojdbc<version>.jar JAR file.
Important: You must use this Guidewire bundled version of the Oracle JDBC
Thin Driver and not the default driver provided by WebLogic.
Procedure
-
Browse to the appropriate directory for your Java version, under
PolicyCenter/admin/lib.
Option Description Java 8 PolicyCenter/admin/lib/java8 Java 11 PolicyCenter/admin/lib/java11 - Copy the ojdbc<version>.jar file to the WebLogic $DOMAIN/lib directory.
- Backup and remove the com.oracle.db.jdbc7-dms.jar from the $WLS_INSTALL/oracle_common/modules/features folder.
-
For Java 11 only: backup and remove the three ojdbc8*.jar
drivers from the
$WLS_INSTALL/oracle_common/modules/oracle.jdbc
folder. (You can ignore the
ojdbc7drivers.)Delete ojdbc8.jar, ojdbc8_g.jar, and ojdbc8dms.jar from the c:/example/weblogic-12.2.1/oracle_common/modules/oraclejdbc directory. - Ensure that ojdbc<version>.jar is not in any part of the CLASSPATH.
- In the $WLS_INSTALL/oracle_common/common/bin directory, edit commExtEnv.sh and add ojdbc<version>.jar to the beginning of WEBLOGIC_CLASSPATH.
- Open the WebLogic Server Administration Console.
- Choose .
- Click Lock & Edit.
- Click New to create a Generic Data Source.
-
Enter a name and JNDI name for the data source.
The JNDI name must match the value of the
datasource-nameattribute of the<jndi-connection-pool>element in the database-config.xml file. The JNDI name typically begins withjdbc/. - Select Oracle as the Database Type.
- Select Oracle's Driver (Thin) for Service Connections.
- Select Versions:Any for Database Driver and click Next.
- Fill in connection properties for your environment and click Next.
- Uncheck Supports Global Transactions, click Next and complete the data source creation.
- Deploy the EAR file for PolicyCenter which has appropriate JNDI setting in database-config.xml.
-
Start PolicyCenter.
A log similar to the following example demonstrates that the created JNDI is being used:
example-t46 2018-08-28 13:58:03,608 INFO Finished security config example-t46 2018-08-28 13:58:03,608 INFO Starting database ClaimCenterDatabase on env null example-t46 2018-08-28 13:58:03,608 INFO Using JNDI data source example-t46 2018-08-28 13:58:03,608 INFO Looking up JNDI datasource 'jdbc/cliCCDatasource'... example-t46 2018-08-28 13:58:03,608 INFO Using JNDI datasource jdbc/cliCCDatasource
