aspose file tools
The moose likes BEA/Weblogic and the fly likes Extracting BFILE from database Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Products » BEA/Weblogic
Reply Bookmark "Extracting BFILE from database" Watch "Extracting BFILE from database" New topic
Author

Extracting BFILE from database

jessica bedi
Greenhorn

Joined: Jul 14, 2006
Posts: 1
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
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Extracting BFILE from database
 
Similar Threads
SQLException: non-existent directory or file for FILEEXISTS operation
writing to multiple file simultaneously
storing and retrieving file in JSP?
jsp,html
Reading From a Binary Large Object(BLOB)