• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ClassCastException Weblogic and Oracle CLOB object

 
Ranch Hand
Posts: 485
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
All,
My web application uses Weblogic connection pool for database activities.
I am using Oracle database.


I have a jar file / class file which has the following piece of code, which my application uses.


Please remember i can't modify the above line of code.

When i am running the application i am getting the below error...



It seems like weblogic returns the object 'weblogic.jdbc.wrapper.Clob_oracle_sql_CLOB', rather than the 'oracle.sql.CLOB' which i am expecting.

Is there any way i can force the weblogic to return the object i am expecting,
since i can't modify the above piece of code, in which case, i can cast it to 'weblogic.jdbc.wrapper.Clob_oracle_sql_CLOB'.

Any help would be appreciated....
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
At the risk of being redundant, I can finally answer this one :-)

Weblogic wraps all special data types like LOB, CLOBs, etc.. in wrapper classes before returning them. Weblogic does this by default.

You can turn this option off as explained in below article:

http://adfpractice-fedor.blogspot.com/2011/09/weblogic-wrapping-data-types.html
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic