Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

CLOB ClassCastException

 
Gul Khan
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I have a DAO inserting a operating on a CLOB column. The method works fine when run standalone but when I use it inside weblogic 8.1 it throws ClassCastException.



Appreciate any pointers. Thanks
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no you cannot type cast a parent into child, while parent is having the reference of itself.

though, dont know if there is some parent and child relation or not.
 
Gul Khan
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thats the way to insert the CLOB value and it does work when run standalone. It was only creating problems while run in weblogic.

The problem is that
Clob xmlClob= rs.getClob(1) ;

is supposed to return java.sql.Clob but its returning

weblogic.jdbc.wrapper.Clob_oracle_sql_CLOB

It worked fine when I casted it to weblogic CLOB, but i would prefer using oracle.sql.Clob. I dont know how to make weblogic return me the plain java.sql.Clob from the resultset. Any Help?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic