• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem using OracleArray  RSS feed

V Katiyar
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to use weblogic.jdbc.vendor.oracle.OracleArray on WLS8.1 sp4 to read out VARRAY of a type in Oracle (it is an array of Oracle type). I have followed the instructions in http://edocs.bea.com/wls/docs81/jdbc/thirdparty.html#1043614. I get the following error.
java.lang.ClassCastException: weblogic.jdbc.rmi.SerialArray_weblogic_jdbc_rmi_internal_ArrayStub_weblogic_jdbc_rmi_internal_ArrayImpl_weblogic_jdbc_wrapper_Array_oracle_sql_ARRAY_814_WLStub

My Datasource is configured to use the Oracle thin driver ...9.x

<Code Snippet>
Connection con = .............
stmt = con.prepareCall("Call myproc (?,?)");
java.util.Map map = con.getTypeMap();
map.put("MYAPP.V_ARRAY", Class.forName("util.MyArraySQLData"));
Array sqlArray = stmt.getArray(2);
fails====> weblogic.jdbc.vendor.oracle.OracleArray oracleArray = (weblogic.jdbc.vendor.oracle.OracleArray )sqlArray;
} catch(Exception ex) {
</Code Snippet>

I would appreciate any pointers.
stu derby
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm really really guessing here, but what I'm guessing is that your alteration of the type map is what's tripping you up.

If my guess is right, then either you need to not alter the type map, or util.MyArraySQLData needs to either implement or extend something that it doesn't currently (like oracle.sql.ARRAY).

Sorry, I can't be more helpful, this stuff is just past the boundary of what I really know... If you figure it out, please post a followup, so we can learn from your suffering...
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!