Skip to Content
0
Former Member
Feb 01, 2007 at 04:38 AM

HOW TO CREATE CONNECTION POOL

48 Views

Hi everyone,

Our application connects to Oracle database and we installed the Drivers and created DataSourceName successfully.

When we are trying to lookup its throwing exception, below are the details.

CODE:

InitialContext ic = new InitialContext();

out.println("Initial Context="+ic);

DataSource ds = (DataSource) ic.lookup("java:comp/env/jdbc/DB");

DATASOURCE.XML

<data-source>

<data-source-name>jdbc/DB</data-source-name>

<driver-name>oracle.jdbc.driver.OracleDriver</driver-name>

<sql-engine>native_sql</sql-engine>

<jdbc-1.x>

<driver-class-name>oracle.jdbc.driver.OracleDriver</driver-class-name>

<url>jdbc:oracle:thin:@192.168.68.15:1521:ORCL</url>

<user-name>etrans22dev</user-name>

<password>etrans</password>

</jdbc-1.x>

</data-source>

EXCEPTION :

"Exception during lookup operation of object with name webContainer/applications/sap.com/SAP eTrans689/eTrans689/java:comp/env/jdbc/DB, cannot resolve object reference '

HOW TO CREATE A CONNECTION POOL WITH JNDI NAME "ORACLE POOL" FOR DATASOURCE "jdbc/DB"

Regards

Muthu