java.lang.ClassCastException: weblogic.jdbc.wrapper.CallableStatement

(Doc ID 1134010.1)

Last updated on SEPTEMBER 18, 2017

Applies to:

Oracle Weblogic Server - Version 10.3 to 10.3.3
Information in this document applies to any platform.
This document is applicable for Using Weblogic JDBC API


Symptoms

Migrating from OC4J to WLS 11g(11.1.2) and  using Oracle extensions to the JDBC API from within WebLogic.
After obtaining the underlying vendor connection, they are getting a ClassCastException when trying to cast it to an OracleConnection.

java.lang.ClassCastException: oracle.jdbc.driver.LogicalConnection cannot be cast to oracle.jdbc.OracleConnection
at dep.dep.fra.base.JdbcDAOImpl.getOracleConnection(JdbcDAOImpl.java:50)
at dep.dep.fra.base.BaseDAO.getOracleConnection(BaseDAO.java:21)
at dep.dep.fra.dao.UtilDAO.getFuelData(UtilDAO.java:802)
at dep.dep.fra.fuels.servlet.FraPortStatusActionDisplay.execute(FraPortStatusActionDisplay.java:287)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)

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