StarQuest Technical Documents

Using StarSQL for Java with Oracle WebLogic

Last Update: 19 February 2014
Product: StarSQL for Java
Version: 2.5 or later
Article ID: SQV00SJ013

Abstract

Oracle WebLogic is a Java Enterprise Edition (Java EE) application server and part of the Oracle Fusion Middleware product family.

The StarSQL for Java JDBC driver can be used with Oracle WebLogic to access DB2 data. This document explains how to configure WebLogic 12c (12.1.1) to use StarSQL for Java.

Solution

  1. Install StarSQL for Java to a directory without spaces in its name (e.g. C:\StarSQL_Java rather than C:\Program Files\StarQuest\StarSQL_Java).
  2. Configure StarSQL for Java licensing: edit StarLicense.properties and/or configure licensing with License Configuration application. You can use one of the supplied sample applications to verify licensing.
  3. Update the WebLogic Server’s classpath to include the location of the JDBC driver classes. Edit the commEnv.cmd/sh script in WL_HOME/common/bin (e.g. C:\Oracle\Middleware\Oracle_Home\oracle_common\common\bin\commEnv.cmd) and prepend the StarSQL for JDBC driver and StarLicense.properties files e.g.:

set DB_DRIVER_CLASSPATH=C:/StarSQL_Java/StarSQL_JDBC.jar;C:/StarSQL_Java/StarLicense.properties
set WEBLOGIC_CLASSPATH=%DB_DRIVER_CLASSPATH%;%JAVA_HOME%\lib\tools.jar;%PROFILE_CLASSPATH%;%ANT_HOME%/lib/ant-all.jar;%ANT_CONTRIB%/lib/ant-contrib.jar;%CAM_NODEMANAGER_JAR_PATH%

  1. Start the Weblogic server with
    C:\Oracle\Middleware\Oracle_Home\user_projects\domains\base_domain\startWebLogic.cmd
  2. Open a browser to the console (e.g. http://127.0.0.1:7001/console) and log on.
  3. Select Data Sources (under Domain Configurations/Services).
  4. Select New Generic Datasource.
  5. Give it a name of your choosing, set Database Type=Other and select Next.
  6. On the next screen, set Database Driver=Other and select Next.
  7. Leave the transaction options at their default values and select Next.
  8. Enter Database user name & password and select Next.
  9. Enter the following values:

Driver Class Name: com.starsql.jdbc.SQDriver
URL: jdbc: StarSQL_JDBC://myhost:446/MYRDB;commitProcedureCall=false;user=myuser
Plus any other properties that you want to specify

  1. Select Test Configuration button.
  2. Select Finish to save the configuration.


DISCLAIMER

The information in technical documents comes without any warranty or applicability for a specific purpose. The author(s) or distributor(s) will not accept responsibility for any damage incurred directly or indirectly through use of the information contained in these documents. The instructions may need to be modified to be appropriate for the hardware and software that has been installed and configured within a particular organization.  The information in technical documents should be considered only as an example and may include information from various sources, including IBM, Microsoft, and other organizations.