pageHelper报错: java.lang.NoClassDefFoundError: Could not initialize class com.github.pagehelper.pa...

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in file [D:\java\sts\workSpace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\yujiao_crm004\WEB-INF\classes\spring\applicationContext-dao.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class 

com.github.pagehelper.parser.impl.AbstractParserCaused by: java.lang.NoClassDefFoundError: Could not initialize class com.github.pagehelper.parser.impl.AbstractParser

我的mybatis的版本是3.3,pageHelper的版本是3.7.5也添加了mybatis-paginator-1.2.15.jar,并且配置如下

<plugins><plugin interceptor="com.github.pagehelper.PageHelper">

          <property name="dialect" value="mysql" /></plugin></plugins>

但是启动的时候,还是报错,原因是少添加了一个jar包jsqlparser-0.9.5.jar

参考博客:https://www.cnblogs.com/Joanna-Yan/p/7256105.html

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容