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
"Muralidaran Chakravarthy" <chakra...@mtmc.army.mil> wrote in message
news:3ce16855$1...@newsgroups2.bea.com...
"Muralidaran Chakravarthy" <chakra...@mtmc.army.mil> wrote in message
news:3ce16855$1...@newsgroups2.bea.com...
>
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...
>