当前位置: 首页 > news >正文

解决com.kingbase8.util.KSQLException: This _connection has been closed.

 问题描述

一个消息管理系统,系统采用kingbase8数据库,数据库采用单体模式,后台应用也采用springboot单体模式。系统正式上线后,出现几个JDBC响应的异常信息:

  • com.kingbase8.util.KSQLException: An I/O error occurred while sending to the backend.
  • java.net.SocketTimeoutException: Read timed out.
  • com.kingbase8.util.KSQLException: This _connection has been closed.
  • org.springframework.dao.DataAccessResourceFailureException: JDBC rollback; This _connection has been closed.; nested exception is com.kingbase8.util.KSQLException: This _connection has been closed.

完整错误日志如下:

2025-01-24 15:28:34.585 [http-nio-8015-exec-2] [1;31mERROR[0;39m [36mdruid.sql.Statement:148[0;39m - {conn-10720, pstmt-2487241} execute error. UPDATE ehc_task SET name = ?, event_type_code = ?, task_type = ?, start_time = ?, end_time = ?, start_time_cycle = ?, end_time_cycle = ?, event_type_name = ?, content = ?, is_flow = ?, initiator = ?, handle_status = ?, lamp_color = ?, status = ?, create_user_id = ?, create_user_name = ?, handle_dimension = ?, type = ?, task_uid = ?, union_id = ?, union_name = ?, is_expire = ?, is_urgent = ?, create_by = ?, create_time = ?, update_by = ?, update_time = ? WHERE id = ? AND is_del = 0
java.sql.BatchUpdateException: Batch entry 0 UPDATE ehc_task SET name = '测试事件', event_type_code = 'SJSN', task_type = 1, start_time = '2025-01-01 00:00:00+08', end_time = '2025-01-27 00:00:00+08', start_time_cycle = '', end_time_cycle = '', event_type_name = '工作盯盯', content = '测试内容', is_flow = '0', initiator = '蹇杨', handle_status = 2, lamp_color = '#FFCE20', status = 2, create_user_id = '1802631429172006913', create_user_name = '蹇杨', handle_dimension = 2, type = 2, task_uid = '2a159287', union_id = 6, union_name = '成都市武侯区总工会', is_expire = '0', is_urgent = '0', create_by = '蹇杨', create_time = '2025-01-23 13:42:48.833+08', update_by = '朱燕', update_time = '2025-01-24 15:28:24.54+08' WHERE id = 1553 AND is_del = 0 was aborted: An I/O error occurred while sending to the backend.  Call getNextException to see other _errors in the batch.at com.kingbase8.jdbc.BatchResultHandler.handleError(BatchResultHandler.java:286)at com.kingbase8.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:674)at com.kingbase8.jdbc.KbStatement.internalExecuteBatch_(KbStatement.java:1403)at com.kingbase8.jdbc.KbStatement.executeBatch(KbStatement.java:1438)at com.kingbase8.jdbc.KbPreparedStatement.executeBatch(KbPreparedStatement.java:3051)at com.alibaba.druid.filter.FilterChainImpl.statement_executeBatch(FilterChainImpl.java:3101)at com.alibaba.druid.filter.FilterAdapter.statement_executeBatch(FilterAdapter.java:2506)at com.alibaba.druid.filter.FilterEventAdapter.statement_executeBatch(FilterEventAdapter.java:273)at com.alibaba.druid.filter.FilterChainImpl.statement_executeBatch(FilterChainImpl.java:3099)at com.alibaba.druid.filter.FilterAdapter.statement_executeBatch(FilterAdapter.java:2506)at com.alibaba.druid.filter.FilterEventAdapter.statement_executeBatch(FilterEventAdapter.java:273)at com.alibaba.druid.filter.FilterChainImpl.statement_executeBatch(FilterChainImpl.java:3099)at com.alibaba.druid.proxy.jdbc.StatementProxyImpl.executeBatch(StatementProxyImpl.java:198)at com.alibaba.druid.pool.DruidPooledPreparedStatement.executeBatch(DruidPooledPreparedStatement.java:551)at org.apache.ibatis.executor.BatchExecutor.doFlushStatements(BatchExecutor.java:123)at org.apache.ibatis.executor.BaseExecutor.flushStatements(BaseExecutor.java:129)at org.apache.ibatis.executor.BaseExecutor.flushStatements(BaseExecutor.java:122)at org.apache.ibatis.executor.CachingExecutor.flushStatements(CachingExecutor.java:114)at sun.reflect.GeneratedMethodAccessor100.invoke(Unknown Source)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:498)at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:64)at com.sun.proxy.$Proxy401.flushStatements(Unknown Source)at sun.reflect.GeneratedMethodAccessor100.invoke(Unknown Source)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:498)at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:64)at com.sun.proxy.$Proxy401.flushStatements(Unknown Source)at org.apache.ibatis.session.defaults.DefaultSqlSession.flushStatements(DefaultSqlSession.java:249)at com.baomidou.mybatisplus.extension.toolkit.SqlHelper.lambda$executeBatch$1(SqlHelper.java:224)at com.baomidou.mybatisplus.extension.toolkit.SqlHelper.executeBatch(SqlHelper.java:182)at com.baomidou.mybatisplus.extension.toolkit.SqlHelper.executeBatch(SqlHelper.java:217)at com.baomidou.mybatisplus.extension.service.impl.ServiceImpl.executeBatch(ServiceImpl.java:240)at com.baomidou.mybatisplus.extension.service.impl.ServiceImpl.updateBatchById(ServiceImpl.java:192)at com.baomidou.mybatisplus.extension.service.IService.updateBatchById(IService.java:268)at com.baomidou.mybatisplus.extension.service.IService$$FastClassBySpringCGLIB$$f8525d18.invoke(<generated>)at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:137)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:123)at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:388)at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:708)at org.jeecg.modules.eventhub.dao.impl.EhcTaskDaoImpl$$EnhancerBySpringCGLIB$$7771ddc5.updateBatchById(<generated>)at org.jeecg.modules.base.task.TaskJob.updateLampColor(TaskJob.java:306)at org.jeecg.modules.base.task.TaskJob$$FastClassBySpringCGLIB$$13b3c93b.invoke(<generated>)at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)at org.springframework.aop.framework.CglibAopProxy.invokeMethod(CglibAopProxy.java:386)at org.springframework.aop.framework.CglibAopProxy.access$000(CglibAopProxy.java:85)at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:704)at org.jeecg.modules.base.task.TaskJob$$EnhancerBySpringCGLIB$$aa5db2df.updateLampColor(<generated>)at org.jeecg.modules.eventhub.
http://www.lryc.cn/news/533836.html

相关文章:

  • openAI官方prompt技巧(二)
  • 【非 root 用户下全局使用静态编译的 FFmpeg】
  • 【嵌入式 Linux 音视频+ AI 实战项目】瑞芯微 Rockchip 系列 RK3588-基于深度学习的人脸门禁+ IPC 智能安防监控系统
  • 前端布局与交互实现技巧
  • idea 找不到或者无法加载主类
  • Flink 调用海豚调度器 SQL 脚本实现1份SQL流批一体化的方案和可运行的代码实例
  • ES6 Map 数据结构是用总结
  • go结构体详解
  • 机器学习-关于线性回归的表示方式和矩阵的基本运算规则
  • kafka 3.5.0 raft协议安装
  • 后台管理系统网页开发
  • 使用一个大语言模型对另一个大语言模型进行“调教”
  • golang使用sqlite3,开启wal模式,并发读写
  • 如何利用maven更优雅的打包
  • 音频进阶学习十二——Z变换一(Z变换、收敛域、性质与定理)
  • cursor指令工具
  • MySQL 主从读写分离实现方案(一)—MariaDB MaxScale实现mysql8读写分离
  • 阿里云 | DeepSeek人工智能大模型安装部署
  • LLAMA-Factory安装教程(解决报错cannot allocate memory in static TLS block的问题)
  • STM32 CUBE Can调试
  • MySQL数据存储- 索引组织表
  • 基于STM32设计的仓库环境监测与预警系统
  • VSCode便捷开发
  • 理解 Maven 的 pom.xml 文件
  • docker数据持久化的意义
  • opentelemetry-collector 配置elasticsearch
  • ASP.NET Core JWT Version
  • 【ArcGIS】R语言空间分析、模拟预测与可视化技术
  • 日常知识点之面试后反思遗留问题汇总
  • 链表(LinkedList) 1