kangyongh的gravatar头像
kangyongh2018-07-02 11:02:32

排列三中奖规则及奖金:ssm中加上PageHelper.startPage(pagenum,pagesize)后为什么抛出如下错误?

上海快三今日开奖走势国结果 www.6r52v.cn 2018-07-02 10:50:45,722 DEBUG [org.springframework.web.servlet.mvc.annotation.ResponseStatusExceptionResolver] - Resolving exception from handler [[email protected]]: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
### Error querying database.  Cause: java.lang.RuntimeException: 无法处理该类型[class org.apache.ibatis.builder.xml.dynamic.DynamicSqlSource]的SqlSource
### Cause: java.lang.RuntimeException: 无法处理该类型[class org.apache.ibatis.builder.xml.dynamic.DynamicSqlSource]的SqlSource
2018-07-02 10:50:45,723 DEBUG [org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver] - Resolving exception from handler [[email protected]]: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
### Error querying database.  Cause: java.lang.RuntimeException: 无法处理该类型[class org.apache.ibatis.builder.xml.dynamic.DynamicSqlSource]的SqlSource
### Cause: java.lang.RuntimeException: 无法处理该类型[class org.apache.ibatis.builder.xml.dynamic.DynamicSqlSource]的SqlSource
2018-07-02 10:50:46,067 DEBUG [org.springframework.web.servlet.DispatcherServlet] - Could not complete request
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
### Error querying database.  Cause: java.lang.RuntimeException: 无法处理该类型[class org.apache.ibatis.builder.xml.dynamic.DynamicSqlSource]的SqlSource
### Cause: java.lang.RuntimeException: 无法处理该类型[class org.apache.ibatis.builder.xml.dynamic.DynamicSqlSource]的SqlSource
 at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:73)
 at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:346)
 at $Proxy23.selectList(Unknown Source)
 at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:182)
 at org.com.system.kyh.daoImpl.MessageDaoImpl.list(MessageDaoImpl.java:18)
 at org.com.system.kyh.serviceImpl.MessageServiceImpl.list(MessageServiceImpl.java:74)
 at org.com.system.kyh.controller.MessageController.query(MessageController.java:62)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at org.springframework.web.servlet.mvc.multiaction.MultiActionController.invokeNamedMethod(MultiActionController.java:471)
 at org.springframework.web.servlet.mvc.multiaction.MultiActionController.handleRequestInternal(MultiActionController.java:408)
 at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
 at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
 at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:919)
 at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:851)
 at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:953)
 at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:844)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
 at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:829)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
 at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
 at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
 at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
 at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
 at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
 at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
 at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:313)
 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:662)
Caused by: org.apache.ibatis.exceptions.PersistenceException:
### Error querying database.  Cause: java.lang.RuntimeException: 无法处理该类型[class org.apache.ibatis.builder.xml.dynamic.DynamicSqlSource]的SqlSource
### Cause: java.lang.RuntimeException: 无法处理该类型[class org.apache.ibatis.builder.xml.dynamic.DynamicSqlSource]的SqlSource
 at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:8)
 at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:80)
 at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:72)
 at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:68)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:338)
 ... 40 more
Caused by: java.lang.RuntimeException: 无法处理该类型[class org.apache.ibatis.builder.xml.dynamic.DynamicSqlSource]的SqlSource
 at com.github.pagehelper.SqlUtil.processMappedStatement(SqlUtil.java:312)
 at com.github.pagehelper.SqlUtil.doProcessPage(SqlUtil.java:460)
 at com.github.pagehelper.SqlUtil._processPage(SqlUtil.java:407)
 at com.github.pagehelper.SqlUtil.processPage(SqlUtil.java:374)
 at com.github.pagehelper.PageHelper.intercept(PageHelper.java:255)
 at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:42)
 at $Proxy32.query(Unknown Source)
 at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:78)
 ... 47 more
2018-07-02 10:50:46,072 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Returning cached instance of singleton bean 'org.springframework.context.annotation.internalScheduledAnnotationProcessor'
2018-07-02 10:50:46,072 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Returning cached instance of singleton bean 'org.springframework.scheduling.config.ContextLifecycleScheduledTaskRegistrar#0'
2018-7-2 10:50:46 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet [springmvc] in context with path [/system] threw exception [Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
### Error querying database.  Cause: java.lang.RuntimeException: 无法处理该类型[class org.apache.ibatis.builder.xml.dynamic.DynamicSqlSource]的SqlSource
### Cause: java.lang.RuntimeException: 无法处理该类型[class org.apache.ibatis.builder.xml.dynamic.DynamicSqlSource]的SqlSource] with root cause
java.lang.RuntimeException: 无法处理该类型[class org.apache.ibatis.builder.xml.dynamic.DynamicSqlSource]的SqlSource
 at com.github.pagehelper.SqlUtil.processMappedStatement(SqlUtil.java:312)
 at com.github.pagehelper.SqlUtil.doProcessPage(SqlUtil.java:460)
 at com.github.pagehelper.SqlUtil._processPage(SqlUtil.java:407)
 at com.github.pagehelper.SqlUtil.processPage(SqlUtil.java:374)
 at com.github.pagehelper.PageHelper.intercept(PageHelper.java:255)
 at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:42)
 at $Proxy32.query(Unknown Source)
 at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:78)
 at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:72)
 at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:68)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:338)
 at $Proxy23.selectList(Unknown Source)
 at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:182)
 at org.com.system.kyh.daoImpl.MessageDaoImpl.list(MessageDaoImpl.java:18)
 at org.com.system.kyh.serviceImpl.MessageServiceImpl.list(MessageServiceImpl.java:74)
 at org.com.system.kyh.controller.MessageController.query(MessageController.java:62)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at org.springframework.web.servlet.mvc.multiaction.MultiActionController.invokeNamedMethod(MultiActionController.java:471)
 at org.springframework.web.servlet.mvc.multiaction.MultiActionController.handleRequestInternal(MultiActionController.java:408)
 at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
 at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
 at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:919)
 at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:851)
 at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:953)
 at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:844)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
 at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:829)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
 at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
 at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
 at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
 at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
 at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
 at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
 at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:313)
 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
 at java.lang.Thread.run(Thread.java:662)

所有回答列表(1)
kangyongh的gravatar头像
kangyongh LV102018年7月2日

问题已经解决,这个问题之所以出现,是因为在使用mybatis的时候版本比较低,导致PageHelper使用分页的时候无法使用,建议最好用

 <dependency>
            <groupId>org.mybatis</groupId>
            <artifactId>mybatis</artifactId>
            <version>3.4.2</version>
        </dependency>
         <dependency>  
            <groupId>org.mybatis</groupId>  
            <artifactId>mybatis-spring</artifactId>  
            <version> 1.3.1</version>  
        </dependency>

及以上版本

评论(0)最佳答案
顶部客服微信二维码底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友
  • 农业农村部2017年返乡下乡双创人员达740万人 2019-04-24
  • A站受黑客攻击:近千万条用户数据外泄 涉ID及密码等 2019-03-29
  • 语文水平太差,直通通的转不弯来,又怎么表现逻辑大师的水平,忽悠成为自我暴露 2019-03-25
  • 亚冠-曾诚神扑救主 中超德比权健主场0-0恒大 2019-03-25
  • 看好啦!是时候表演真正的技术了 2019-03-16
  • 楼市下半年或持续降温 房地产长效机制加速推进 2019-03-16
  • “世界杯时间”,以独特方式展现中国元素 2019-01-11
  • 香港迪士尼推“无现金”体验便利游客 2019-01-11
  • 华媒:荷兰超市提倡减少使用一次性塑料制品 2018-07-13
  • 抓住党的建设着力点,焕发全党蓬勃活力  2018-07-12
  • 湖州市从细从实依法治路 2018-07-12
  • 【新时代 新作为 新篇章】“煤老大”渐行渐远 新动能清风徐来 2018-07-11
  • 西部网(陕西新闻网)www.cnwest.com 2018-07-11
  • 平凡人生闪耀璀璨的生命光华——“中国网事·感动2017”颁奖典礼侧记 2018-07-10
  • 为什么截留信马克的帖子?这还有摆事实讲道理存在吗? 2018-07-10
  • 997| 429| 615| 306| 60| 194| 854| 525| 873| 844|