Posted By:
Parvati_Erra
Posted On:
Monday, March 20, 2006 08:29 AM
I am getting a problem while trying to access the database through javax.sql.DataSource class in iPlanet application server. Steps I followed are. 1. Created a connection pool for Oracle 9.x vendor. 2. Created a JNDI name and assigned to the above pool 3. Used Oracle thin driver. 4. Used the below code to connect to the database String dataSourceName = myJNDI // Get a context for the JNDI look up Context ctx = new InitialContext(); dataSource = (DataSource) ctx.lookup (dataSourceName); Connection con = dataSource.getConnection(); I am getting the following error: Name myJNDI is not bound in this Context I tested the above conne
More>>
I am getting a problem while trying to access the database through javax.sql.DataSource class in iPlanet application server. Steps I followed are.
1. Created a connection pool for Oracle 9.x vendor.
2. Created a JNDI name and assigned to the above pool
3. Used Oracle thin driver.
4. Used the below code to connect to the database
String dataSourceName = myJNDI
// Get a context for the JNDI look up
Context ctx = new InitialContext();
dataSource = (DataSource) ctx.lookup (dataSourceName);
Connection con = dataSource.getConnection();
I am getting the following error: Name myJNDI is not bound in this Context
I tested the above connection with the DriverManager.getConnection(), and it is working fine. Could someone help me to resolve this problem? Its very urgent. Thanks in advance.
Padmaja.
<<Less