|
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:
- Create JDBC Provider
- Expand Resources, then click JDBC Providers.
- Select the scope (Cell, Node or Server) for the JDBC Provider, then
click Apply.
- Click New to create the JDBC Provider.
- 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)
- 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.
- 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.
- Click the OK button.
- Create WebSphere Application Server 5.0 Data Source
- In the Additional Properties section for the JDBC Providers,
click Data Sources, then click New and enter all the
required parameters.
- In the Additional Properties for the data source, click
Custom Properties.
- 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:
- Add the properties userid and password in the Addition
Properties for the data source.
- 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.
- 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 |
|
|
|
|
|
|
|