Recently I had to setup JDBC/OCI connection pool in stand alone OC4J 10.1.3.x using an oracle client 10.2.0.3. The problem here is OC4J 10.1.3.x comes with JDBC driver 10.1.0.5 of ojdbc14.jar. Which means you will have issues using the 10.2.0.3 oracle client libraries.
As a result of that you must upgrade the driver to use the client version JDBC driver as well as set various environment variables before starting stand alone OC4J. The steps are as follows.
Note: This is based on OC4J 10.1.3.4 and on a windows environment, using instant client 10.2.0.3
1. Download 10.2.0.3 instant client as follows, in my case installed in directory as follows
You can download the 10.2.0.3 version from here.
2. Open up command window and set environment variables as follows
(ADDRESS = (PROTOCOL = TCP)(HOST = xxxx.au.oracle.com)(PORT = 1522))
(SERVER = DEDICATED)
(SERVICE_NAME = linux10g)
3. Start stand alone OC4J as follows, ensuring you use the same commend window from step 2 above.
Starting OC4J from D:\jdev\stand-alone-oc4j\10134\j2ee\home ...
09/02/23 13:42:29 Oracle Containers for J2EE 10g (10.1.3.4.0) initialized
4. OC4J 10.1.3.x is using 10.1.0.5 JDBC driver which means it will have issues connecting using 10.2.0.3 instant client so we have to upgrade the JDBC driver to 10.2.0.3 as shown below for the whole container. Follow this metalink note to fix that so it matches the same version of instant client which would mean you use ojdbc14.jar from 10.2.0.3 jar file of ojdbc14.jar.
Note 420303.1 - How to Use The Latest Thin JDBC Driver Across All Applications For a 10.1.3.x OAS Container
You can download the 10.2.0.3 JDBC driver jar file from this link, but it should be available in your oracle client install.
5. Stop stand alone OC4J to pick up the shared library change.
6. Start stand alone OC4J.
7. Create a data source as follows.
user="scott" password="tiger" url="jdbc:oracle:oci:@LINUX10G"/>
For more information on data sources refer to the following documentation.
Oracle® Containers for J2EE Services Guide
Part Number B28958-01