Getting java.lang.ClassCastException: orcle.jdbc.driver.T4CConnection cannot be cast to oracle.jdbc.driver.OracleConnection in JBoss EAP 6 and 7

Solution Verified - Updated -

Issue

  • It is getting below exception while calling data base procedures having the table type as input parameter.
java.lang.ClassCastException: orcle.jdbc.driver.T4CConnection cannot be cast to oracle.jdbc.driver.OracleConnection 
  • The above error is coming only when getting the connection from connection pool. User is experiencing the behavior in JBoss Enterprise Application Platform (EAP) 6.10.GA environment and occurs every time. This issue is pending from long time.
  • oracle.jdbc.driver.T4CConnection cannot be cast to oracle.jdbc.driver.OracleConnection in JBoss EAP 7

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.1.0
    • 7.x
  • Oracle

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content