标签:esc key can hat keyword lib struct ted cti
java.lang.ClassCastException: com.alibaba.druid.pool.DruidPooledConnection cannot be cast to oracle.jdbc.OracleConnection
at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:105)
at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:73)
失败原因:
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
原文地址:https://www.cnblogs.com/zhjh256/p/11940196.html