com.alibaba.druid.pool.DruidPooledConnection cannot be cast to oracle.jdbc.OracleConnection 异常解决办法
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 异常解决办法的更多相关文章
- 阿里巴巴高新能数据源com.alibaba.druid.pool.DruidDataSource的jar包配置
aspectjweaver-1.7.4.jar druid-0.2.9.jar 两个包,用于提供com.alibaba.druid.pool.DruidDataSource
- 配置DruidDataSource参考(com.alibaba.druid.pool.DruidDataSource)
<bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource" init-met ...
- 【Druid】 阿里巴巴推出的国产数据库连接池com.alibaba.druid.pool.DruidDataSource
阿里巴巴推出的国产数据库连接池,据网上测试对比,比目前的DBCP或C3P0数据库连接池性能更好 简单使用介绍 Druid与其他数据库连接池使用方法基本一样(与DBCP非常相似),将数据库的连接信息 ...
- com.alibaba.druid.pool.DruidDataSource : {dataSource-2} init error
这几天准备写一个项目,其中的整合druid的时候,发现出现了下面这个错误.找了好久都没有找到.网上的各种解决方法都不对. 2018-11-07 16:26:28.940 INFO 19684 --- ...
- Could not open JDBC Connection for transaction; nested exception is com.alibaba.druid.pool.GetConnection
Could not open JDBC Connection for transaction; nested exception is com.alibaba.druid.pool.GetConnec ...
- Javassm连接数据库报错129 ERROR [com.alibaba.druid.pool.DruidDataSource] - {dataSource-1} init error
Javassm连接数据库报错129 ERROR [com.alibaba.druid.pool.DruidDataSource] - {dataSource-1} init error 发现jdbc这 ...
- ERROR 14856 --- [reate-882003853] com.alibaba.druid.pool.DruidDataSource : create connection error, url: jdbc:mysql://localhost:3306/xhb?useUnicode=true&characterEncoding=UTF-8, errorCode 1045, sta
ERROR 14856 --- [reate-882003853] com.alibaba.druid.pool.DruidDataSource : create connection error, ...
- canal部署启动的时候报错com.alibaba.druid.pool.DruidDataSource - testWhileIdle is true, validationQuery not set
报错信息:com.alibaba.druid.pool.DruidDataSource - testWhileIdle is true, validationQuery not set 解决方法: 找 ...
- com.alibaba.druid.pool.DruidDataSource
https://www.cnblogs.com/wuyun-blog/p/5679073.html DRUID介绍 DRUID是阿里巴巴开源平台上一个数据库连接池实现,它结合了C3P0.DBCP.PR ...
随机推荐
- Android-----File(文件各种操作)
在Android编程中,操作文件是基本的必备技能,现在做一个操作文件的小工具:DocumentTool.java 代码如下: package com.hs.example.exampleapplica ...
- elasticsearch 分词后聚合
es 对于text类型其实是分词存储的,但是有时候在聚合的时候,会发现这种情况下,会把字段分词后进行聚合.例如(1)A,B (2)B,C 然后聚合后B就是2个,A和C各一个. 这需要看业务需求了 ...
- 使用kubeadm安装Kubernetes 1.15.3 并开启 ipvs
一.安装前准备 机器列表 主机名 IP node-1(master) 1.1.1.101 node-2(node) 1.1.1.102 node-3(node) 1.1.1.103 设置时区 cp / ...
- Httpd服务入门知识-Httpd服务常见配置案例之配置持久连接
Httpd服务入门知识-Httpd服务常见配置案例之配置持久连接 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.查看默认的持久连接时间 [root@node101.yinzhe ...
- SQL Server 存储过程 数组参数 (How to pass an array into a SQL Server stored procedure)
Resource from StackOverflow 使用存储过程,如何传递数组参数? 1.分割解析字符串,太麻烦 2.添加Sql Server 自定义类型 sp_addtype 问题需求:需要向S ...
- 性能测试基础---LR场景设置
·场景设置. 性能测试场景依托于性能测试脚本,但是又独立于脚本. 所谓场景(scenario),就是用来模拟多用户运行性能测试脚本的情形,是来源于我们对于业务场景的分析的. 性能测试对于业务场景的分析 ...
- css3 -webkit-image-set 设置不同分辨率 背景图片
- Properties 取值和设置函数 Hashtable的静态内部类Entry的结构和克隆方法
- python--简单的文件断点续传实例
一.程序说明 1.文件上传目标路径:home/file 2.目标文件:putfile.png 3.服务端代码:put_server.py 4.客户端代码:put_client.py 二.各部分代码 1 ...
- Bomb Enemy
Description Given a 2D grid, each cell is either a wall 'W', an enemy 'E' or empty '0' (the number z ...