jQuery in Action, 3rd edition
The moose likes JDBC and Relational Databases and the fly likes java.lang.ClassCastException : OracleResultSet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "java.lang.ClassCastException : OracleResultSet" Watch "java.lang.ClassCastException : OracleResultSet" New topic

java.lang.ClassCastException : OracleResultSet

munna next
Ranch Hand

Joined: Sep 28, 2004
Posts: 46
Hi ,
I am tring to Insert a BLOB in a Oracle Databse Table and I am getting


The line I am getting error is
blob = ((OracleResultSet) rs).getBLOB(1);

Any help please ?
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63866

"munna next",

There aren't may rules that have been put into place here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Forum Bartender

[Asking smart questions] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63866

In order for that line to cause that exception, rs must not be an OracleResultSet. What class is rs?
Noushad Urikunnath

Joined: Oct 08, 2003
Posts: 1
Are you using weblogic for deployment ? In that case, weblogic has their own proprietary wrapper classes for result set, blob etc. It will not return oracle.jdbc.driver.OracleResultSet, but would return weblogic.jdbc.vendor.oracle.OracleResultSet. Similarly other App servers might have their own implementation classes.
I agree. Here's the link: http://aspose.com/file-tools
subject: java.lang.ClassCastException : OracleResultSet
It's not a secret anymore!