Method org/apache/commons/dbcp/DelegatingResultSet.isClosed()Z is abstract
按照网络上的排除建议,换成了alibaba的druid。
相关maven依赖如下,注意版本匹配问题
spring版本使用4.3.24.RELEASE <dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>3.4.6</version>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-typehandlers-jsr310</artifactId>
<version>1.0.2</version>
</dependency> <dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
<version>1.3.0</version>
</dependency> <dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.35</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<version>1.0.25</version>
</dependency>
spring配置文件application-context.xml
<bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
<!-- 基本属性 url、user、password -->
<property name="driverClassName" value="${jdbc.driver}"/>
<property name="url" value="${jdbc.url}"/>
<property name="username" value="${jdbc.username}"/>
<property name="password" value="${jdbc.password}"/> <!-- 配置监控统计拦截的filters -->
<property name="filters" value="stat"/> <!-- 配置初始化大小、最小、最大 -->
<property name="maxActive" value="20"/>
<property name="initialSize" value="1"/>
<property name="minIdle" value="1"/> <!-- 配置获取连接等待超时的时间 -->
<property name="maxWait" value="60000"/> <!-- 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 -->
<property name="timeBetweenEvictionRunsMillis" value="60000"/> <!-- 配置一个连接在池中最小生存的时间,单位是毫秒 -->
<property name="minEvictableIdleTimeMillis" value="300000"/> <property name="testWhileIdle" value="true"/>
<property name="testOnBorrow" value="false"/>
<property name="testOnReturn" value="false"/> <!-- 打开PSCache,并且指定每个连接上PSCache的大小 -->
<property name="poolPreparedStatements" value="true"/>
<property name="maxOpenPreparedStatements" value="20"/>
</bean>
mybatis-spring.xml配置文件
<!DOCTYPE configuration
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration> <settings>
<!--映射下划线风格到驼峰风格-->
<setting name="mapUnderscoreToCamelCase" value="true"/>
</settings>
<typeHandlers>
<typeHandler handler="org.apache.ibatis.type.InstantTypeHandler" />
<typeHandler handler="org.apache.ibatis.type.LocalDateTimeTypeHandler" />
<typeHandler handler="org.apache.ibatis.type.LocalDateTypeHandler" />
<typeHandler handler="org.apache.ibatis.type.LocalTimeTypeHandler" />
<typeHandler handler="org.apache.ibatis.type.OffsetDateTimeTypeHandler" />
<typeHandler handler="org.apache.ibatis.type.OffsetTimeTypeHandler" />
<typeHandler handler="org.apache.ibatis.type.ZonedDateTimeTypeHandler" />
</typeHandlers>
</configuration>

如果遇到以上错误可能需要配置一下mybatis-spring.xml里面的
<settings>
<!--映射下划线风格到驼峰风格-->
<setting name="mapUnderscoreToCamelCase" value="true"/>
</settings>
至此问题解决
参考资料:
https://blog.csdn.net/qq_38366063/article/details/89914909
https://blog.csdn.net/lixingtao0520/article/details/76599077
https://blog.csdn.net/jay100500/article/details/84996268
Method org/apache/commons/dbcp/DelegatingResultSet.isClosed()Z is abstract的更多相关文章
- java.lang.IllegalAccessError: org.apache.commons.dbcp.DelegatingPreparedStatement.isClosed()Z
做spring和mybaits整合时出现的错误,让这个问题困扰了一早上,通过查资料终于把这个问题解决了 具体问题描述: java.lang.IllegalAccessError: org.apache ...
- org.apache.commons.dbcp.DelegatingPreparedStatement.isClosed()Z和NewProxyPreparedStatement.isClosed()
原文转:https://blog.csdn.net/qq_37909508/article/details/83028536 报错: NewProxyPreparedStatement.isClose ...
- Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException:
七月 17, 2014 4:56:01 下午 org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service( ...
- org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Access denied for user 'root'@'localhost' (using password:
tationProcessor' to allow for resolving potential circular referencesDEBUG 2018-05-28 11:32:35,016 o ...
- org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'com.microsoft.sqlserver.jdbc.SQLServerDriver '
问题摘要: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nest ...
- Spring 整合Mybatis 出现了Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create Poola
我出现的 报错信息如下: ### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionExc ...
- org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class
转载自:http://songjianyong.iteye.com/blog/1663170 org.springframework.transaction.CannotCreateTransacti ...
- java.lang.AbstractMethodError: Method com/mchange/v2/c3p0/impl/NewProxyPreparedStatement.isClosed()Z is abstract
二月 26, 2019 3:47:40 上午 org.apache.catalina.core.StandardWrapperValve invoke严重: Servlet.service() for ...
- Method com/mchange/v2/c3p0/impl/NewProxyResultSet.isClosed()Z is abstract
HTTP Status 500 - Handler dispatch failed; nested exception is java.lang.AbstractMethodError: Method ...
随机推荐
- (12)流程控制if
流程: 代码执行的过程 流程控制:对代码执行过程的管控 分支结构: (1) 单项分支 (2) 双项分支 (3) 多项分支 (4) 巢状分支 如果条件表达式为真 ,则执行代码块里面的内容从上到下 (1) ...
- java实现网络请求超时自动熔断
原文:https://www.jianshu.com/p/326465500d1c?utm_campaign 使用场景 之前在实现熔断降级组件时,需要实现一个接口的超时中断,意思是,业务在使用熔断降级 ...
- HDU - 6242 Geometry Problem (几何,思维,随机)
Geometry Problem HDU - 6242 Alice is interesting in computation geometry problem recently. She found ...
- JavaScript002,验证输入
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> ...
- 前端与SQL
转载自:http://developer.51cto.com/art/201706/542163.htm
- vue3.0脚手架 创建项目
1.下载node最新稳定版本,并且安装 2.安装好之后,在cmd或者terminal下, 使用npm -v 查看当前npm版本,验证是否安装成功 3.安装成功后,运行 npm i -g @vue/cl ...
- node.js接收异步任务结果的两种方法----callback和事件广播
事件广播 发送方调用emit方法,接收方调用on方法,无论发送方或是接收方,都会工作在一个频道 声明了一个模块,用于读取mime.json中的记录 var fs = require('fs'); va ...
- python自动华 (十四)
Python自动化 [第十四篇]:HTML介绍 本节内容: Html 概述 HTML文档 常用标签 2. CSS 概述 CSS选择器 CSS常用属性 1.HTML 1.1概述 HTML是英文Hyper ...
- .Net Core: 跨域Cros概要
读取配置 public class AppConfig { public static IConfigurationRoot Configuration { get; set; } public st ...
- 031_检测 MySQL 服务是否存活
#!/bin/bash#host 为你需要检测的 MySQL 主机的 IP 地址,user 为 MySQL 账户名,passwd 为密码#这些信息需要根据实际情况修改后方可使用 host=127.0. ...