royalcyber
asked on
ClassCastException Weblogic and Oracle CLOB
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.getClo b(columnNu mber);
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.ClassCastExcept ion' at level: 0 - Error Text: 'weblogic.jdbc.wrapper.Clo b_oracle_s ql_CLOB'
2. Apr 3, 2008 10:19:33 AM com.agencyport.menu.MenuCo ntroller insert
3. SEVERE: java.lang.ClassCastExcepti on: weblogic.jdbc.wrapper.Clob _oracle_sq l_CLOB
4.
5. at com.agencyport.database.Or acleDataba seAgent.up dateLOB(Or acleDataba seA
6. gent.java:111)
7. at com.agencyport.menu.MenuCo ntroller.i nsert(Menu Controller .java:815)
It seems like Weblogic returns the object 'weblogic.jdbc.wrapper.Clo b_oracle_s ql_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.Clo b_oracle_s ql_CLOB'.
Any help will be highly appreciated....
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.getClo
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.ClassCastExcept
2. Apr 3, 2008 10:19:33 AM com.agencyport.menu.MenuCo
3. SEVERE: java.lang.ClassCastExcepti
4.
5. at com.agencyport.database.Or
6. gent.java:111)
7. at com.agencyport.menu.MenuCo
It seems like Weblogic returns the object 'weblogic.jdbc.wrapper.Clo
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.Clo
Any help will be highly appreciated....
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
This is NOT a solution! HOW did you change your code?