Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ClassCastException while asting ResultSet to OracleResultSet. Using weblogic connection pool

0 views
Skip to first unread message

Muralidaran Chakravarthy

unread,
May 14, 2002, 3:41:09 PM5/14/02
to

Hi,

I am using weblogic server 5.1 and connection pools for accessing Oracle database.
We wanted to use BLOB in oracle and I coded the java class to insert data into BLOB
field.

When I code a sample calss without using weblogic pool, I do not have any problem.
But when I use the weblogic connection pool, I get classcastException as described
below:


I am using

"insert into shipmentCorrection (" + insfields + ") VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,empty_blob())"

to insert a dummy record with empty_blob and then getting the BLOB locater by the
following code:

java.sql.ResultSet rset = stmt.executeQuery ("SELECT zipped_pdf FROM shipmentCorrection
WHERE shipment_id ='"+ ShipmentId + "' and correction_num ="+ CorrectionNum +" and
Bl_Type = '"+ blType +"'" );

rset.next();

BLOB blob = ((OracleResultSet)rset).getBLOB(1);
java.io.OutputStream outstream = blob.getBinaryOutputStream();


IN the above line of code where I cast the ResultSet to OracleResultSet, I get the
classcastException as follows:
I donno how to solve this problem. Could any one please help me on this ?

java.lang.ClassCastException: weblogic.jdbc.pool.ResultSet
at fmweb.SQL.PdfDataSQL.insertPdfData(PdfDataSQL.java:347)
at fmweb.framework.ShipmentManagerImpl.insertPdfData(ShipmentManagerImpl
java:2471)
at fmweb.framework.ShipmentManager_WLSkel.invoke(ShipmentManager_WLSkel.
java:1316)
at weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(BasicServerOb
jectAdapter.java:347)
at weblogic.rmi.extensions.BasicRequestHandler.handleRequest(BasicReques
tHandler.java:69)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest
java:15)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:135)


Thanks,

Muralidaran Chakravarthy

B.Gorkem ERCAN

unread,
May 15, 2002, 3:05:53 PM5/15/02
to
When using weblogic pool drivers it is not possible to cast to an Oracle
JDBC driver, (or any other driver )
pool driver hides the driver you have configured.


"Muralidaran Chakravarthy" <chakra...@mtmc.army.mil> wrote in message
news:3ce16855$1...@newsgroups2.bea.com...

B.Gorkem ERCAN

unread,
May 15, 2002, 3:04:48 PM5/15/02
to
When using weblogic pool drivers it is not possible to cast to an Oracle
JDBC driver, (or any other driver )
pool driver hides the driver you have configured.


"Muralidaran Chakravarthy" <chakra...@mtmc.army.mil> wrote in message
news:3ce16855$1...@newsgroups2.bea.com...
>

B.Gorkem ERCAN

unread,
May 15, 2002, 3:07:27 PM5/15/02
to
From: "B.Gorkem ERCAN" <gorkem...@hotmail.com>
Newsgroups: weblogic.developer.interest.jdbc
References: <3ce16855$1...@newsgroups2.bea.com>
Subject: Re: ClassCastException while asting ResultSet to OracleResultSet. Using weblogic connection pool
Date: Wed, 15 May 2002 22:07:27 +0300
Lines: 73
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: 212.253.29.208
X-Original-NNTP-Posting-Host: 212.253.29.208
Message-ID: <3ce2...@newsgroups2.bea.com>
X-Trace: 15 May 2002 12:07:22 -0700, 212.253.29.208
X-Original-Trace: 15 May 2002 12:07:22 -0700, 212.253.29.208
Organization: BEA SYSTEMS Inc
XPident: Unknown
Path: newsgroups2.bea.com
Xref: newsgroups2.bea.com weblogic.developer.interest.jdbc:13598

pool driver keeps the oracle connection as an inner attribute so it is
not possible to cast.

"Muralidaran Chakravarthy" <chakra...@mtmc.army.mil> wrote in message
news:3ce16855$1...@newsgroups2.bea.com...
>

0 new messages