SSM整合 运行报Handler dispatch failed; nested exception is java.lang.AbstractMethodError: Method com/mcha
Posted 似水流年,是谁苍白了等待
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了SSM整合 运行报Handler dispatch failed; nested exception is java.lang.AbstractMethodError: Method com/mcha相关的知识,希望对你有一定的参考价值。
今天在整合SSM的时候,在运行过程中出现了如下错误:
org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.AbstractMethodError: Method com/mchange/v2/c3p0/impl/NewProxyResultSet.isClosed()Z is abstract
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1055)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)
javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
在整合过程中用到了c3p0 JDBC连接池,因为c3p0有自动回收空闲连接功能,出现这个错误解决过程中查资料说是引入的依赖版本太低,引入的版本为:
<dependency>
<groupId>c3p0</groupId>
<artifactId>c3p0</artifactId>
<version>0.9.1.2</version>
</dependency>
当将这个版本改为更高版本的时候找不到,爆红,最后groupId 中的c3p0改为com.mchange,改为如下依赖,问题解决:
<dependency>
<groupId>com.mchange</groupId>
<artifactId>c3p0</artifactId>
<version>0.9.5.2</version>
</dependency>
以上是关于SSM整合 运行报Handler dispatch failed; nested exception is java.lang.AbstractMethodError: Method com/mcha的主要内容,如果未能解决你的问题,请参考以下文章
SSM整合 运行报Handler dispatch failed; nested exception is java.lang.AbstractMethodError: Method com/mcha
IDEA下spring boot+fremarker启动报错would dispatch back to the current handler URL [/hello] again. Check y
SSM整合报错:errorCode 1045, state 28000 java.sql.SQLException: Access denied for user