时间:2021-07-01 10:21:17 帮助过:9人阅读
失败原因:
The connection pool usually has a wrapper around the real connection instance, that‘s why your cast fails.
连接池通常包装了一个真实的真实的Connection实例。
解决方案:
Connection connection = ...; // Oracle
// 增加此代码,将Connection转换为OracleConnection
connection = connection.unwrap(OracleConnection.class);
StructDescriptor st = new StructDescriptor("T_ORDER", connection);
com.alibaba.druid.pool.DruidPooledConnection cannot be cast to oracle.jdbc.OracleConnection 异常解决办法
标签:esc key can hat keyword lib struct ted cti