It's not a secret anymore!*
The moose likes JDBC 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
Bookmark "java.lang.ClassCastException : OracleResultSet" Watch "java.lang.ClassCastException : OracleResultSet" New topic
Author

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

java.lang.ClassCastException.

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


Any help please ?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61606
    
  67

"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.

Thanks!
bear
Forum Bartender


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61606
    
  67

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

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