This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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: 60763
    
  65

"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: 60763
    
  65

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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: java.lang.ClassCastException : OracleResultSet
 
Similar Threads
Inserting Image into Oracle.
fetch out of sequence
ClassCastException when casting my resultset to OracleResultSet
Exception when reading image( using getBLOB ) from database
inserting data in to blob...