• Post Reply Bookmark Topic Watch Topic
  • New Topic

java.lang.ClassCastException: weblogic.jdbc.wrapper.Blob_oracle_sql_BLOB cannot be cast to oracle.sq  RSS feed

 
Ramesh kakarla
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

i am using oracle11g and Weblogic 10(Java 5)

Follwing is the snippet of code and exception :
 
Campbell Ritchie
Marshal
Posts: 56522
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are the inheritance trees of those two blob classes? They are obviously not the same so you cannot cast one to the other.
 
Ramesh kakarla
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
below are import packages I am using..
import java.sql.*;
import java.io.*;
import java.net.*;
import oracle.jdbc.*;
import oracle.sql.*;

Please help me what I need to modify.
 
Campbell Ritchie
Marshal
Posts: 56522
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I didn't ask about imports, but about inheritance. I believe you cannot cast those two types like that.
 
Knute Snortum
Sheriff
Posts: 4270
127
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Some JavaRanch forum etiquette:

Please UseCodeTags (←click) when you post code. I've put them in for you.

Also, don't use very long lines in your code, it's had to read. Put comments on their own line and break them up into shorter lines.
 
Dave Tolls
Ranch Foreman
Posts: 3056
37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It looks like weblogic is also wrapping any BLOB stuff, presumably due to the odd nature of BLOBS, as well as the connection from its pool.
A bit of Googling on that weblogic class and you get this:
https://blogs.oracle.com/cmsdk/entry/disable_jdbc_data_type_wrapping

I know this is talking about Oracle CMS, but just read how to disable wrapping of datatypes.
Note this apparently is only possible for WLS 10.3.4 or above.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!