【转】java.sql.SQLException: statement is closed语句被关闭 druid连接池报错
我之前在用druid 1.0.28版本也出现过这个问题,
现象就是:
报这个错的时候, 往往会出现在一条毫无错误的sql执行上报错, sql放到数据库上执行或者单独拎出来执行完全没问题, 但是为什么一直报错呢?
问题就出在druid连接池上, 连接池在执行完了某一条错误的sql以后, 报错信息会被保存在执行sql的线程中, 当下一条拿到这个线程的sql执行时, 就直接报错,而不会去执行sql,
解决这个问题最简单的办法就是重启, 因为重启以后, 会清空线程池,所有线程都会重新启动, 问题线程自然会清除掉了, 但是当你点击某个会报错的sql时, 就又出问题了,而且报错的sql不会导致当前操作失败, 而只保留问题线程,所以从功能上看完全看不出哪里出了问题, 但是后台会有报错信息日志.
最终的解决方法就是解决那条问题线程,肯定是哪里出错才会保留报错信息, 或者升级druid的版本, 从1.0.28 升到1.0.29就能解决这个问题, 1.0.29对psCache做了优化, 问题线程会被清除.
【转】java.sql.SQLException: statement is closed语句被关闭 druid连接池报错的更多相关文章
- java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO)报错
今天用spring整合mybatis的时候,报了这个错误.去网上查了一下,网上大多数都是用户权限问题,但是我用SQLyog视图使用root用户crud没有问题,排除了是权限的问题,后面发现是idea提 ...
- springjdbc使用c3p0连接池报错 java.lang.NoClassDefFoundError: com/mchange/v2/ser/Indirector
MyMaincom.test.sunc.MyMaintestMethod(com.test.sunc.MyMain)org.springframework.beans.factory.BeanCrea ...
- Caused by: java.sql.SQLException: Couldn't perform the operation getAutoCommit: You can't perform any operations on this connection. It has been automatically closed by Proxool for some reason (see lo
系统启动,一段时间不操作,然后在来操作时,报错如下: Caused by: java.sql.SQLException: Couldn't perform the operation getAutoC ...
- java.sql.SQLException: Prepared or callable statement has more than 2000 parameter markers及解决方案
1. 问题 最近在项目中修bug的时候,碰到这样一个错误: Caused by: java.sql.SQLException:Prepared or callable statement has mo ...
- java.sql.SQLException: Operation not allowed after ResultSet closed
转自:http://blog.csdn.net/hellobobantang/article/details/7173622 java.sql.SQLException: Operation not ...
- HiveServer2 的jdbc方式创建udf的修改(add jar 最好不要使用),否则会造成异常: java.sql.SQLException: Error while processing statement: null
自从Hive0.13.0开始,使用HiveServer2 的jdbc方式创建udf的临时函数的方法由: ADD JAR ${HiveUDFJarPath} create TEMPORARY funct ...
- tomcat dbcp 基于jndi当配置java.sql.SQLException: Already closed
最近发现了一个现象,观察到的生产环境,不要有一段时间操作,然后另一个操作,首先将有一个数据库连接:java.sql.SQLException: Already closed.,例如下列: error ...
- java.sql.SQLException: The SQL statement must not be null or empty.这个错误
今天发现了这个错误 java.sql.SQLException: The SQL statement must not be null or empty. 并且看了些网页:综合说下这个错误. 一般都是 ...
- java.sql.SQLException: Error while processing statement: FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
执行Hive查询: Console是这样报错的 java.sql.SQLException: Error from org.apache.hadoop.hive.ql.exec.mr.MapRedTa ...
随机推荐
- PHP如何清除COOKIE?PHP无法删除COOKIE?设置COOKIE有效期、COOKIE过期
cookie和session的区别? http://www.cnblogs.com/phphuaibei/archive/2011/11/15/2250082.html PHP如何清除COOKIE?P ...
- [CLPR] 卷积神经网络的结构
本文翻译自: http://www.codeproject.com/Articles/16650/Neural-Network-for-Recognition-of-Handwritten-Digi ...
- oracle 之 安装10.2.0.1 且 升级到 10.2.0.4
一. centos 6.5 安装 oracle 10.2.0.1 1.安装操作系统,选择桌面环境 2.配置本地yum源 , 可参考 http://blog.csdn.net/zhang12345645 ...
- Phonegap 开发环境搭建
以Android为例介绍Phonegap开发环境搭建 一. 软件下载 1. JDK 8 下载 http://www.oracle.com/technetwork/java/javase/downloa ...
- JSP动作指令
JSP动作指令 动作指令与编译指令不间,编译指令是通知 Servlet 引擎的处理消息,而动作指令只是运行时的脚本动作.编译指令在将JSP 编译成 Servlet 时起作用:处理指令通常可替换成 Ja ...
- Centos 6 安装 配置 oracle11g R2
1.安装centos6.3_64位: 下载地址:http://mirror.bit.edu.cn/centos/6.3/isos/x86_64/ CentOS-6.3-x86_64-bin-DVD1. ...
- [MVC 4] ActionResult 使用示例
在控制器 HomeController.cs 中使用以下代码 public ActionResult Contact() { ViewBag.Message = "Your contact ...
- tcpdump查看某个端口数据
tcpdump -i eth0 -nn -A port tcpdump src
- centos7使用tinyproxy搭建简单http(s)服务器,无用户密码验证
1 安装 yum install tinyproxy 2 查找配置文件地址 whereis tinyproxy.conf 3 编辑配置文件 vim tinyproxy.conf 把 allow 12 ...
- IOS 上传ipa文件失败
** No suitable application records were found. Verify your bundle identifier 'com.***' is correct. i ...