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

  1. Browse to the appropriate directory for your Java version, under PolicyCenter/admin/lib.
    OptionDescription
    Java 8 PolicyCenter/admin/lib/java8
    Java 11 PolicyCenter/admin/lib/java11
  2. Copy the ojdbc<version>.jar file to the WebLogic $DOMAIN/lib directory.
  3. Backup and remove the com.oracle.db.jdbc7-dms.jar from the $WLS_INSTALL/oracle_common/modules/features folder.
  4. 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 ojdbc7 drivers.)
    Delete ojdbc8.jar, ojdbc8_g.jar, and ojdbc8dms.jar from the c:/example/weblogic-12.2.1/oracle_common/modules/oraclejdbc directory.
  5. Ensure that ojdbc<version>.jar is not in any part of the CLASSPATH.
  6. In the $WLS_INSTALL/oracle_common/common/bin directory, edit commExtEnv.sh and add ojdbc<version>.jar to the beginning of WEBLOGIC_CLASSPATH.
  7. Open the WebLogic Server Administration Console.
  8. Choose Service > Data Source.
  9. Click Lock & Edit.
  10. Click New to create a Generic Data Source.
  11. Enter a name and JNDI name for the data source.

    The JNDI name must match the value of the datasource-name attribute of the <jndi-connection-pool> element in the database-config.xml file. The JNDI name typically begins with jdbc/.

  12. Select Oracle as the Database Type.
  13. Select Oracle's Driver (Thin) for Service Connections.
  14. Select Versions:Any for Database Driver and click Next.
  15. Fill in connection properties for your environment and click Next.
  16. Uncheck Supports Global Transactions, click Next and complete the data source creation.
  17. Deploy the EAR file for PolicyCenter which has appropriate JNDI setting in database-config.xml.
  18. 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