users@glassfish.java.net

Re: Exception: com.sun.gjc.spi.jdbc40.DataSource40 cannot be cast to oracle.jdb

From: vince kraemer <Vince.Kraemer_at_Sun.COM>
Date: Mon, 16 Mar 2009 08:13:05 -0700

Unless you absolutely have to call methods that are not defined by the
jdbc apis, you probably should not attempt to do the cast to
oracle.jdbc.pool.OracleConnectionPoolDataSource.

vbk

glassfish_at_javadesktop.org wrote:
> hi,
> i'm using the next code to access an Oracle Database from glassfish:
> javax.naming.InitialContext ic = new javax.naming.InitialContext();
> oracle.jdbc.pool.OracleConnectionPoolDataSource ds = (oracle.jdbc.pool.OracleConnectionPoolDataSource)ic.lookup(jdbc/pool");
>
> and i obtain the next error Exception: java.lang.ClassCastException: com.sun.gjc.spi.jdbc40.DataSource40 cannot be cast to oracle.jdbc.pool.OracleConnectionPoolDataSource
>
> Anybody knows how can i configure glassfish connection resource or web server, to obtain a pooled connection?.
>
> the users of aplication are the same of database. whit these can i made a pool for different users?
>
> Thanks.
> [Message sent by forum member 'gpiramide' (gpiramide)]
>
> http://forums.java.net/jive/thread.jspa?messageID=337212
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>