0

I have some Java JDBC database access code that throws an exception that states in part - "[wrapping: oracle.jdbc.driver.T4CConnection@477a4e1f] is not a wrapper for or implementation of oracle.jdbc.OracleConnection]". I haven't been able to find out how T4CConnection and OracleConnection are related, if at all. Based on the names, it seems like they should be. How can I get an OracleConnection from a T4CConnection?

I am using Oracle 11 and 12.

kc2001
  • 5,008
  • 4
  • 51
  • 92

1 Answers1

1

T4CConnection implements OracleConnection via the following inheritance hierarchy: oracle.jdbc.driver.T4CConnection extends oracle.jdbc.driver.PhysicalConnection which extends oracle.jdbc.driver.OracleConnection which extends oracle.jdbc.OracleConnectionWrapper which implements oracle.jdbc.OracleConnection.

The error is likely a result of a class loading problem, where the Oracle classes are being loaded from multiple jars by different class loaders. These sources (1, 2, 3) discuss this in more detail.

kc2001
  • 5,008
  • 4
  • 51
  • 92