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

Home -> Community -> Usenet -> c.d.o.misc -> ClassCastException with StructDescriptor.createDescriptor() & DataSource

ClassCastException with StructDescriptor.createDescriptor() & DataSource

From: ndu35 <member29273_at_dbforums.com>
Date: Fri, 13 Jun 2003 15:08:13 +0000
Message-ID: <2999393.1055516893@dbforums.com>

Hello,

I'm using Oracle 9i in a J2EE environnement (Jboss3.0.4 for testing and websphere5 for production) with a thin driver v9

I would like to create a StructDescriptor object for a given Oracle object type like this:

StructDescriptor structdesc = StructDescriptor.createDescriptor

                                          (sql_type_name, connection);


All works fine when testing it outside the application server, with a simple JDBC connection.

But when I use it with a Jboss DataSource, I obtain a
"ClassCastException" with my connection (I suppose I will obtain the
same result with a WAS5 DataSource).

Method "public static StructDescriptor createDescriptor (String s, java.sql.Connection connection)" in class "oracle.sql.StructDescriptor" seems to Class Cast the "java.sql.Connection" object in a
"oracle.jdbc.OracleConnection" one.

So this method seems to depends on the connection's implementation class, which I can't control when obtaining it from a DataSource.

How to make it works with a generic DataSource?

Thanks

--
Posted via http://dbforums.com
Received on Fri Jun 13 2003 - 10:08:13 CDT

Original text of this message

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