My Oracle Support Banner

Error java.lang.ClassCastException: oracle_jdbc_driver_T4CPreparedStatement_proxy after Upgrade to iAs 10.1.3 (Doc ID 1092893.1)

Last updated on JUNE 17, 2010

In this Document


While migrate an application running under Oracle Application Server 10.1.2 with Oracle JDBC Thin Driver to Oracle Application Server 10.1.3 with Oracle JDBC Thin Driver, the following error is generated:
java.lang.ClassCastException: oracle_jdbc_driver_T4CPreparedStatement_proxy

The code that runs under the older system is effectively:
Connection conn = dataSource.getConnection();
OraclePreparedStatement stmt = (OraclePreparedStatement) conn.prepareStatement(sql);

The OraclePreparedStatement interface needs to be used because of the use of "INSERT ... RETURNING ..." to retrieve the value of the primary key, which is a GUID generated by the BEFORE INSERT trigger.

Query DML, which works with simple Statement or PreparedStatement instances returned by Connection.getStatement() or Connection.prepareStatement() calls have no problems accessing the database and returning values. The sanitized content of the first iteration of the data-sources.xml file is as follows:
<?xml version="1.0" standalone="yes">
<managed-data-source name="myds" jndi-name="jdbc/mydsCoredDS" connection-pool-name="myConnectionPool" user="myuser" password="->" tx-level="local" />
<connection-pool name="myConnectionPool" initial-limit="20" min-connections="20" max-connections="60" inactivity-timeout="1800" abandoned-connection-timeout="300" connection-retry-interval="5" max-connect-attempts="3"/


Upgraded to Oracle Application Server 10.1.3.


To view full details, 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 a vibrant support community of peers and Oracle experts.