Reputation: 43
In java class I am trying to get rid of ClassCast exception as below.
java.lang.ClassCastException: weblogic.jdbc.wrapper.Array_oracle_sql_ARRAY
Using
if (someArray instanceof weblogic.jdbc.wrapper.Array)
ar = (oracle.sql.ARRAY) ((weblogic.jdbc.wrapper.Array)someArray).unwrap(Class.forName("oracle.sql.ARRAY")));
else
ar = (oracle.sql.ARRAY)someArray;
But I am not able to find the maven dependency having weblogic.jdbc.wrapper.Array
http://adfpractice-fedor.blogspot.com/2011/09/weblogic-wrapping-data-types.html
Upvotes: 0
Views: 1578
Reputation: 23
Most likely the tutorial that you're reffering to was created using JDeveloper, which has a bunch of WebLogic jars bundled.
If you're not using JDeveloper, here's what you can do - first identify which jar contains the class (the most lightweight one I could find is com.bea.core.datasource6.jar - this jar is a part of JDeveloper):
<dependency>
<groupId>com.oracle.weblogic</groupId>
<artifactId>com.bea.core.datasource6</artifactId>
<version>12.2.1-0-0</version>
</dependency>
then, in order to resolve the jar, either:
OR
mvn install:install-file
on themUpvotes: 2