WrappedConnectionJDK6 wrapped = (WrappedConnectionJDK6) dbStrategy.getConnection();
Connection underlyingConn = wrapped.getUnderlyingConnection();
OracleConnection oracleConn = (OracleConnection)underlyingConn;
最後行給出錯誤 -oracle.jdbc.driver.T4CConnection不能轉換爲oracle.jdbc.OracleConnection
> ERROR
> [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/web].[resteasy-servlet]]
> (http-/0.0.0.0:8080-1) Servlet.service() for servlet resteasy-servlet
> threw exception: org.jboss.resteasy.spi.UnhandledException:
> java.lang.ClassCastException: oracle.jdbc.driver.T4CConnection cannot
> be cast to oracle.jdbc.OracleConnection
這是什麼問題? – Gab
需要從WrappedConnectionJDK6獲得oracle連接,但是它的施放問題..任何線索如何獲得WrappedConnectionJDK6的oracle連接? – user2093576
JBoss用它自己的一個包裝oracle連接(org.jboss.jca.adapters.jdbc.jdk6.WrappedConnectionJDK6)。我試圖調用#getUnderlyingConnection()來獲得底層連接。但是,雖然轉換到這一點Oracle連接它給錯誤...連接鑄造錯誤 – user2093576