Question

I'm deploying an application on weblogic server 10.0.0 using datasource jndi to connect with an oracle database.

I'm having this problem "java.lang.ClassCastException: weblogic.jdbc.wrapper.Array_oracle_sql_ARRAY cannot be cast to oracle.sql.ARRAY " ... Searching in some forums I found the solution disabling this functionality by the web console but they all talk about version 10.3.5 or upper and I can't find this solution in 10.0.0 version. Can Anybody help me?

I found this but I don't see the check and I don't know where to find the weblogic jdbc jar for the next solution listed.

http://supportblog.orindasoft.com/2012/05/classcastexceptionweblogicjdbcwrapperar.html

Was it helpful?

Solution

Yes, I had access to the code, the problem is that the weblogic version that I'm using is 10.0 and it doesn't have the checkbox to disable the wrapper types, and with the code solution, I can't put the weblogic class into my project because conflicts with other libraries (hibernate).

I found this solution:

   java.sql.Array array = (java.sql.Array) result.get("ARRAY");
   Object arrayStructs[] = (Object[]) array.getArray();
   //and then just cast to oracle.sql.STRUCT
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top