How to get the vendor specific jdbc Connection/Statement object in JBoss EAP 6/7
Issue
- Need to access Oracle specific
oracle.jdbc.driver.OracleConnectionandoracle.jdbc.OracleCallableStatement -
Encountered a
ClassCastExceptionwhen attempting to cast to the vendor specific connection object (e.g.oracle.jdbc.driver.OracleConnection):java.lang.ClassCastException: org.jboss.jca.adapters.jdbc.jdk6.WrappedConnectionJDK6 cannot be cast to oracle.jdbc.driver.OracleConnection -
Encountered a
ClassCastNotFoundExceptionwhen migrating code running successfully in EAP 5 to EAP 6/7java.lang.ClassNotFoundException: org.jboss.resource.adapter.jdbc.WrappedConnection -
Warnings are reported in the
server.logwhen declaring an explicit dependency on theorg.jboss.ironjacamar.jdbcadaptersmodule... WARN [org.jboss.as.dependency.private] ... JBAS015867: Deployment "deployment.myapp.war" is using a private module ("org.jboss.ironjacamar.jdbcadapters:main") which may be changed or removed in future versions without notice.
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6
- 7
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
