File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 60049
    
  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: 60049
    
  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.
 
 
subject: java.lang.ClassCastException : OracleResultSet
 
Similar Threads
ClassCastException when casting my resultset to OracleResultSet
fetch out of sequence
inserting data in to blob...
Exception when reading image( using getBLOB ) from database
Inserting Image into Oracle.