• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.lang.ClassCastException : OracleResultSet

 
munna next
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 65129
92
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65129
92
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In order for that line to cause that exception, rs must not be an OracleResultSet. What class is rs?
 
Noushad Urikunnath
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic