ResourceException Thrown Accessing a Proxy Data Source Using The 10.2.0.4 Thin Jdbc Driver On OAS 10.1.3.x (Doc ID 790294.1)

Last updated on NOVEMBER 05, 2016

Applies to:

JDBC - Version: 10.2.0.1 to 10.2.0.4
Oracle Containers for J2EE - Version: 10.1.3.0.0 to 10.1.3.4.0
This problem can occur on any platform.

Symptoms

When attempting to access a proxy data source using a later oracle.jdbc shared library such as 10.2.0.4 JDBC driver the following error occurs.

Caused by: java.sql.SQLException: javax.resource.ResourceException:
java.lang.IllegalArgumentException: object is not an instance of declaring class
at oracle.oc4j.sql.ManagedDataSource.getConnection(ManagedDataSource.java:259)
at oracle.oc4j.sql.ManagedDataSource.getConnection(ManagedDataSource.java:142)
at oracle.oc4j.sql.ManagedDataSource.getConnection(ManagedDataSource.java:127)

Your proxy data source is configured as follows with proxy-sessions set to true, and you have switched to a later 10.2.x JDBC driver for your application.

<managed-data-source name="proxyDS"
    connection-pool-name="ProxyConnectionPool"
    jndi-name="jdbc/proxyDS"/>

<connection-pool name="ProxyConnectionPool"
    proxy-sessions="true">
     <connection-factory factory-class="oracle.jdbc.pool.OracleDataSource"
      user="proxy_user"
       password="proxy_user"
       url="jdbc:oracle:thin:@xxxx.au.oracle.com:1522:linux10g">
    </connection-factory>
  </connection-pool>

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