Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ClassCastException Weblogic and Oracle CLOB

Posted on 2009-05-13
2
Medium Priority
?
2,427 Views
Last Modified: 2013-12-10
All,
My web application uses Weblogic connection pool for database activities.
I am using Oracle database.


I have java class file which has the following piece of code, which my application uses

oracle.sql.CLOB clob = (oracle.sql.CLOB)rs.getClob(columnNumber);

and I don't want to change the above line. But when I run the application, it gives me below error...

   1. SEVERE: Standard exception info for exception of type: 'java.lang.ClassCastException' at level: 0 - Error Text: 'weblogic.jdbc.wrapper.Clob_oracle_sql_CLOB'  
   2. Apr 3, 2008 10:19:33 AM com.agencyport.menu.MenuController insert  
   3. SEVERE: java.lang.ClassCastException: weblogic.jdbc.wrapper.Clob_oracle_sql_CLOB  
   4.    
   5.         at com.agencyport.database.OracleDatabaseAgent.updateLOB(OracleDatabaseA  
   6. gent.java:111)  
   7.         at com.agencyport.menu.MenuController.insert(MenuController.java:815)  



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 will be highly appreciated....
0
Comment
Question by:royalcyber
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Accepted Solution

by:
royalcyber earned 0 total points
ID: 24382800
Thanks to all....

I have changed all my code
0
 

Expert Comment

by:Waldeaux
ID: 24870149
This is NOT a solution!  HOW did you change your code?
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question