Class Cast Problem OracleConnectionPoolDataSource

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");

[749 byte] By [skoizumi2133a] at [2007-11-26 15:39:27]
# 1
I'm betting that the javax.sql.DataSource interface is sufficient for what you're doing. You don't need that cast.%
duffymoa at 2007-7-8 21:57:50 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...