ClassCastExcep OracleResultSetImpl cannot becast to OracleResultSet WLS10.3
VickramSep 20 2010 — edited Feb 8 2011Hi Everybody ,
Please help us in the below issue
We are in the migration process in our project from weblogic 8.1 to 10.3
We are facing the the below issue ( class cast exception ) at the line ( bfile = ((OracleResultSet) rsGetFile).getBFILE(GlobalConstants.B_FILE_CONTENT); )
*[Fri Sep 17 13:33:33.668,<kz0lyf>] DEBUG (WorkRequestServiceImpl:downLoadFile) - Remote Exception occurred : java.rmi.RemoteException: EJB Exception: ; nested exception is:*
javax.ejb.EJBException: EJB Exception: : java.lang.ClassCastException: weblogic.jdbc.wrapper.ResultSet_oracle_jdbc_driver_OracleResultSetImpl cannot be cast to weblogic.jdbc.vendor.oracle.OracleResultSet
snippet of code
==========
import weblogic.jdbc.vendor.oracle.OracleResultSet;
bfile = ((OracleResultSet) rsGetFile).getBFILE(GlobalConstants.B_FILE_CONTENT);
I did some Trial Check still issue not resolved
First Trial Check
As per http://download.oracle.com/docs/cd/E12839_01/web.1111/e13726/thirdparty.htm ,
I have changed the below import
import oracle.jdbc.OracleResultSet;
Error Faced :
[20 Sep 2010 15:04:59,060] [] [ERROR]-[WorkRequestDAO-downLoadFile] - java.sql.SQLException: ORA-22285: non-existent directory or file for FILEEXISTS operation
**********************************************************************************************************************************************
Second Trial Check
The package weblogic.jdbc.vendor.oracle.OracleResultSet is present in weblogic.jar in weblogic 8.1 , but the same package is present in com.bea.core.datasource6_1.4.0.0.jar in weblogic 10.3
Updated the 10.3 weblogic.jar in WEB-INF/lib
Added new jar com.bea.core.datasource6_1.4.0.0.jar in WEB-INF/lib and included them in build.xml
Error Faced :
[Fri Sep 17 13:33:33.668,<kz0lyf>] DEBUG (WorkRequestServiceImpl:downLoadFile) - Remote Exception occurred : java.rmi.RemoteException: EJB Exception: ; nested exception is:
javax.ejb.EJBException: EJB Exception: : java.lang.ClassCastException: weblogic.jdbc.wrapper.ResultSet_oracle_jdbc_driver_OracleResultSetImpl cannot be cast to weblogic.jdbc.vendor.oracle.OracleResultSet
**********************************************************************************************************************************************
Third Trial Check
bfile = ((OracleResultSet) rsGetFile).getBFILE(GlobalConstants.B_FILE_CONTENT);
modified as below as per google
bfile = ((weblogic.jdbc.vendor.oracle.OracleResultSet) rsGetFile).getBFILE(GlobalConstants.B_FILE_CONTENT);
Error Faced :
[Fri Sep 17 13:33:33.668,<kz0lyf>] DEBUG (WorkRequestServiceImpl:downLoadFile) - Remote Exception occurred : java.rmi.RemoteException: EJB Exception: ; nested exception is:
javax.ejb.EJBException: EJB Exception: : java.lang.ClassCastException: weblogic.jdbc.wrapper.ResultSet_oracle_jdbc_driver_OracleResultSetImpl cannot be cast to weblogic.jdbc.vendor.oracle.OracleResultSet
**********************************************************************************************************************************************
Fourth Trial Check
As per http://www.coderanch.com/t/445340/BEA-Weblogic/Migration-Oracle-Weblogic-CLOB-ClassCastException
Implemented new piece of code
weblogic.jdbc.wrapper.ResultSet wlsResultSet = (weblogic.jdbc.wrapper.ResultSet)rsGetFile;
OracleResultSet oracleResultSet = (OracleResultSet)wlsResultSet.getVendorObj();
bfile = oracleResultSet.getBfile(GlobalConstants.B_FILE_CONTENT);
instead of
bfile = ((OracleResultSet) rsGetFile).getBFILE(GlobalConstants.B_FILE_CONTENT);
Error Faced :
[Fri Sep 17 13:33:33.668,<kz0lyf>] DEBUG (WorkRequestServiceImpl:downLoadFile) - Remote Exception occurred : java.rmi.RemoteException: EJB Exception: ; nested exception is:
javax.ejb.EJBException: EJB Exception: : java.lang.ClassCastException: weblogic.jdbc.wrapper.ResultSet_oracle_jdbc_driver_OracleResultSetImpl cannot be cast to weblogic.jdbc.vendor.oracle.OracleResultSet
**********************************************************************************************************************************************
Thank you in advance
can you please help in this to proceed