Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> ClassCastException OracleConnectionPoolDataSource

ClassCastException OracleConnectionPoolDataSource

From: Tiwkiz <Tiwkiz_at_abc.com>
Date: Fri, 19 Jan 2007 21:32:18 GMT
Message-ID: <CNash.147206$rv4.141278@edtnps90>


I defined my connection pool and JDBC Resource to be like the following:

Connectoin Pool
DataClass Name: oracle.jdbc.pool.OracleConnectionPoolDataSource ResourceType: javax.sql.ConnectionPoolDataSource

URL:jdbc:oracle:thin:@192.168.1.30:1521:orcl user:scott
password:tiger

JDBC Resource
JNDI name jdbc/myorcale
Pool Name: jdbc

However, when i get the connection from connection pool in j2ee I get java.lang.ClassCastException. The below is the souce to get the resource. I don't know why I can't get the connection from the pool.

javax.naming.Context c = new javax.naming.InitialContext(); (javax.sql.ConnectionPoolDataSource) c.lookup("jdbc/myoracle"); Received on Fri Jan 19 2007 - 15:32:18 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US