How to create V5.1 and V5.0 data sources using Oracle 9i JDBC OCI driver
 Technote (troubleshooting)
 
Problem(Abstract)
Creating IBM® WebSphere® Application Server V5.0 and V5.1 data sources using the Oracle 9i JDBC OCI Driver.
 
Resolving the problem
From the WebSphere Application Server administrative console:
  1. Create JDBC Provider
    1. Expand Resources, then click JDBC Providers.

    2. Select the scope (Cell, Node or Server) for the JDBC Provider, then click Apply.

    3. Click New to create the JDBC Provider.

    4. In the Configuration tab, under General Properties, select Oracle JDBC Driver from the pull-down list of JDBC Providers, then click Apply.

      Note:
      The following JDBC Drivers are deprecated in WebSphere version 5.0.2 and higher:
      • Oracle JDBC Thin Driver
      • Oracle JDBC Thin Driver (XA)
      • Oracle JDBC oci8 Driver
      • Oracle JDBC oci8 Driver (XA)

    5. In the Classpath, type the fully-qualified name of the Oracle JDBC Driver jar file which is classes12.zip for V5.0 and ojdbc14.jar for V5.1.

    6. In the Native Library Path, type the ORACLE_HOME/lib, where ORACLE_HOME is the directory where Oracle Network client is installed.

      The WebSphere Application Server variables can be used in the Classpath and/or the Native Library Path.

      For example, if ${ORACLE_JDBC_DRIVER_PATH}/classes12.zip and $ORACLE_HOME/lib are specified for Classpath and Native Library Path respectively, the variables ORACLE_JDBC_DRIVER_PATH and ORACLE_HOME must be defined to WebSphere Application Server under the Environment/Manage WebSphere Variables.

      The Implementation Classname must have the default value oracle.jdbc.pool.OracleConnectionPoolDataSource.

    7. Click the OK button.

  2. Create WebSphere Application Server 5.0 Data Source
    1. In the Additional Properties section for the JDBC Providers, click Data Sources, then click New and enter all the required parameters.
    2. In the Additional Properties for the data source, click Custom Properties.
    3. Click the URL and type the value: jdbc:oracle:oci:@<tnsname_alias>.

      Note: The <tnsname_alias> must be defined in $ORACLE_HOME/network/admin/tnsnames.ora file

      In WebSphere Application Server V5.0.1 and higher, the administrative console has a Test Connection button that you can use to test the data source configuration. For the Test Connection to be successful, do one of the following:
      1. Add the properties userid and password in the Addition Properties for the data source.
      2. Create a J2C Authentication Data Entry; in the data source's configuration, select this J2C Authentication Data Entry for the Component-managed Authentication Alias and Container-managed Authentication Alias for the data source.
      3. Otherwise, the Test Connection fails with the exception "java.sql.SQLException: invalid arguments in call." as the user name and password are not passed to the database.
 
 
Cross Reference information
Segment Product Component Platform Version Edition
Application Servers Runtimes for Java Technology Java SDK
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > Java 2 Connectivity (J2C)
Operating system(s): Windows
Software version: 5.1.1
Software edition:
Reference #: 1136952
IBM Group: Software Group
Modified date: Aug 31, 2007