user2836364
user2836364

Reputation: 43

what jar to use in pom.xml for weblogic wrapper?

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

Answers (1)

JamesAlexander03
JamesAlexander03

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

  • use the Oracle Maven Synchronization plugin (WebLogic or JDeveloper install required) to populate your local (or remote) Maven repository with Oracle jars - this basically takes most jars from a WebLogic install and runs a mvn install:install-file on them

Upvotes: 2

Related Questions