How are you acquiring the connection?
Are you using:
DataSource ds = (DataSource)initCtx.lookup("DSName");
or are you doing a simple
Also, review the server logs and look for the following line:
This would indicate that the DB cannot be reached and as a result, the matching strategy for acquiring a connection will not be met.
i access :
Hashtable props = new Hashtable();
initContext = new InitialContext(props);
Object obj = initContext.lookup("OracleDS9i");
DataSource ds = (DataSource) PortableRemoteObject.narrow(obj,DataSource.class);
conn = ds.getConnection("user","pass");
st = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
> "pingDatabase failed..."
this line not exist in log.
the application function without problems.
The problem is, in your connection method
This is actually creates a different pooling criteria (PoolByCri) than the one configured in the datasource (OnePool). So, you have 2 choices.
1) Use the username/password provided in your *-ds.xml file to aquire a connection. In that case, the code would become:
2)If you truly want to allow multiple users for the connection, add the following to your *-ds.xml file
This will tie each connection created via the ds.getConnection("user","pass") to a particular pool. Note, that a sub pool is created 'per user'. So, if you have n users, you have n sub pools.
More can be found here: