mysql查询接口同样遇到这个偶发的报错。Spring Boot 1.5.20+mybatis 3.4.5+druid 1.1.16。同一个接口并发的跑有几率重现。报错不完全一致,但都是被异常关闭导致

1、java.sql.SQLException: Operation not allowed after ResultSet closed] with root cause

2、### Cause: java.sql.SQLException: Error

; uncategorized SQLException for SQL []; SQL state [null]; error code [0]; Error; nested exception is java.sql.SQLException: Error] with root cause

java.lang.NullPointerException: null

at com.mysql.jdbc.ResultSetImpl.next(ResultSetImpl.java:6334)

at com.alibaba.druid.pool.DruidPooledResultSet.next(DruidPooledResultSet.java:69)

3、2019-07-08 14:28:56.756 ERROR [http-nio-8779-exec-1] o.a.c.c.C.[.[.[.[dispatcherServlet] - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.jdbc.UncategorizedSQLException: Error attempting to get column 'modified_by' from result set. Cause: java.sql.SQLException: Error

; uncategorized SQLException for SQL []; SQL state [null]; error code [0]; Error; nested exception is java.sql.SQLException: Error] with root cause

java.lang.NullPointerException: null

at com.mysql.jdbc.ResultSetImpl.findColumn(ResultSetImpl.java:1045)

at com.mysql.jdbc.ResultSetImpl.getLong(ResultSetImpl.java:2759)

at com.alibaba.druid.pool.DruidPooledResultSet.getLong(DruidPooledResultSet.java:302)

at org.apache.ibatis.type.LongTypeHandler.getNullableResult(LongTypeHandler.java:37)

4、2019-07-08 14:29:37.701 ERROR [http-nio-8779-exec-10] o.a.c.c.C.[.[.[.[dispatcherServlet] - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{property='catId', mode=IN, javaType=class java.lang.Integer, jdbcType=INTEGER, numericScale=null, resultMapId='null', jdbcTypeName='null', expression='null'}. Cause: org.apache.ibatis.type.TypeException: Error setting non null for parameter #1 with JdbcType INTEGER . Try setting a different JdbcType for this parameter or a different configuration property. Cause: java.sql.SQLException: statement is closed] with root cause

java.sql.SQLException: statement is closed

at com.alibaba.druid.pool.DruidPooledStatement.checkOpen(DruidPooledStatement.java:181)

at com.alibaba.druid.pool.DruidPooledPreparedStatement.setInt(DruidPooledPreparedStatement.java:311)

at org.apache.ibatis.type.IntegerTypeHandler.setNonNullParameter(IntegerTypeHandler.java:31)

GitHub 加速计划 / druid / druid
6
4
下载
阿里云计算平台DataWorks(https://help.aliyun.com/document_detail/137663.html) 团队出品,为监控而生的数据库连接池
最近提交(Master分支:4 个月前 )
933dee04 - 16 天前
3246166f - Add constructor with SQLParserFeature support to SparkStatementParser - Fix SQLParserUtils to pass features parameter to SparkStatementParser, CKStatementParser and StarRocksStatementParser 25 天前
Logo

AtomGit 是由开放原子开源基金会联合 CSDN 等生态伙伴共同推出的新一代开源与人工智能协作平台。平台坚持“开放、中立、公益”的理念,把代码托管、模型共享、数据集托管、智能体开发体验和算力服务整合在一起,为开发者提供从开发、训练到部署的一站式体验。

更多推荐