How can I get an oracle.jdbc.OracleConnection when using hikari

我与影子孤独终老i 提交于 2019-12-14 00:34:45

问题


I need an oracle.jdbc.OracleConnection to directly work with ORACLE's SDO_GEOMETRY.

I have an Object that is of type: class com.zaxxer.hikari.proxy.ConnectionJavassistProxy

My debugger says its value is: ConnectionJavassistProxy(1082639682) wrapping oracle.jdbc.driver.T4CConnection@220c1ab2

Note that T4CConnection implements oracle.jdbc.OracleConnection

So if I can get access to it, I will have what I need.


回答1:


OracleConnection oracleConnection = connection.unwrap(OracleConnection.class);



来源:https://stackoverflow.com/questions/36803122/how-can-i-get-an-oracle-jdbc-oracleconnection-when-using-hikari

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!