WLS 10.3.2 ClassCastException: weblogic.jdbc.wrapper.Array_oracle_sql_ARRAY cannot be cast to oracle.sql.ARRAY. (Doc ID 1085707.1)

Last updated on JUNE 09, 2016

Applies to:

Oracle WebLogic Server - Version 10.3.2 and later
Information in this document applies to any platform.
***Checked for relevance on 9-Dec-2013***

Symptoms

On configuring a JDBC datasource by using theOracleJDBC thin driver (XA) that comes with the Weblogic (WLS) installation as shown below, WLS throws an exception.

Excerpt of the JDBC config file shows:

... ... ...
<jdbc-driver-params>
    <url>jdbc:oracle:thin:@xx.xx.xxx.xxx:1521:mydb</url>
     <driver-name>oracle.jdbc.xa.client.OracleXADataSource</driver-name>
... ... ...

where xx.xx.xxx.xxx is the IP address of the database server.

During runtime, WLS throws the following exception:

java.rmi.RemoteException: EJB Exception: ; nested exception is:
javax.ejb.TransactionRolledbackLocalException: EJB Exception: ; nested exception is: java.lang.ClassCastException: weblogic.jdbc.wrapper.Array_oracle_sql_ARRAY cannot be cast to oracle.sql.ARRAY
at weblogic.ejb.container.internal.EJBRuntimeUtils.throwRemoteException(EJBRuntimeUtils.java:103)
at weblogic.ejb.container.internal.BaseRemoteObject.handleSystemException(BaseRemoteObject.java:868)
at weblogic.ejb.container.internal.BaseRemoteObject.handleSystemException(BaseRemoteObject.java:809)
at weblogic.ejb.container.internal.BaseRemoteObject.postInvoke1(BaseRemoteObject.java:514)
at weblogic.ejb.container.internal.StatelessRemoteObject.postInvoke1(StatelessRemoteObject.java:60)
at weblogic.ejb.container.internal.BaseRemoteObject.postInvokeTxRetry(BaseRemoteObject.java:441)
at ... ... ...
Caused by: javax.ejb.TransactionRolledbackLocalException: EJB Exception: ; nested exception is: java.lang.ClassCastException: weblogic.jdbc.wrapper.Array_oracle_sql_ARRAY cannot be cast to oracle.sql.ARRAY
at weblogic.ejb.container.internal.EJBRuntimeUtils.throwTransactionRolledbackLocal(EJBRuntimeUtils.java:238)
at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:874)
at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:791)
at weblogic.ejb.container.internal.BaseLocalObject.postInvoke1(BaseLocalObject.java:486)
at weblogic.ejb.container.internal.BaseLocalObject.postInvokeTxRetry(BaseLocalObject.java:424)
at ... ... ...
... 4 more
Caused by: java.lang.ClassCastException: weblogic.jdbc.wrapper.Array_oracle_sql_ARRAY cannot be cast to oracle.sql.ARRAY
at weblogic.jdbc.wrapper.ResultSet_oracle_jdbc_driver_OracleResultSetImpl.getARRAY(Unknown Source)
at com.mycompany.util.DBConverter.getObjectAttributes(DBConverter.java:176)
at ... ... ...
... 6 more

Changes

None.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms