This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem using OracleArray

V Katiyar
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to use 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 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====> 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