Extracting BFILE from database

H

hemarangain

Hi,

This piece of code works fine outside weblogic 8.1
try {
// select the bfile locator from the database
strStatement = " SELECT name"
+ " , bfile_col"
+ " FROM lobsamp"
+ " WHERE id = " + lngId;

stmt = conn.createStatement();

resSet = stmt.executeQuery(strStatement);
System.out.println("metadata------>" + resSet.getmetadata());
if (resSet.next()) {
strFileName = resSet.getString("name");

// get the locator
bFile = ((OracleResultSet)resSet).getBFILE("bfile_col");
}

But when i do this -->
bFile = ((OracleResultSet)resSet).getBFILE("bfile_col");
on weblogic 8.1 platform, it gives me ClassCastException

java.lang.ClassCastException:
weblogic.jdbc.wrapper.ResultSet_oracle_jdbc_driver_OracleResultSetImpl

My question is how do I cast ResultSet object to OracleResultSet ??
Like weblogic.jdbc.vendor.oracle.OracleThinBlob is for oracle.sql.BLOB,
is there any third party drivers with weblogic servers for
oracle.sql.BFILE?

Thank you in advance
-Jessica
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,007
Latest member
obedient dusk

Latest Threads

Top