mybatis分页警告真正解决方法:Hessian/Burlap: 'com.github.pagehelper.Page' is an unknown class in WebappClasss

本文详细介绍了在使用SpringMVC与MyBatis的PageHelper分页插件时遇到的Hessian/Burlap警告问题及其解决办法。通过在表现层正确引入PageHelper和mybatis-paginator的jar包,可以有效避免未知类警告,并解决由此引发的NoClassDefFoundError错误。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

mybatis分页警告:Hessian/Burlap: ‘com.github.pagehelper.Page’ is an unknown class in WebappClasss解决办法

1.今天在使用springmvc+mybatis分页插件pagehelper时,在业务层引用了mybatis的分页插件的jar包

com.github.pagehelper
pagehelper
–>
但是表现层接收时没有引用,所以会报这样的警告:
警告: Hessian/Burlap: ‘com.github.pagehelper.Page’ is an unknown class in WebappClassLoader
context:
delegate: false
repositories:
----------> Parent Classloader:
ClassRealm[plugin>org.apache.tomcat.maven:tomcat7-maven-plugin:2.2, parent: sun.misc.Launcher$AppClassLoader@ec6b00]
java.lang.ClassNotFoundException: com.github.pagehelper.Page

2.因此百度了多篇博客,说是需要在表现层也引入pagehelper的jar包,
<dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper</artifactId> </dependency>
但是在表现层引入后出现了以下错误:
java.lang.NoClassDefFoundError: org/apache/ibatis/session/RowBounds

3.经分析得知,mybatis的分页pagehelper插件依赖于mybatis的相关mybatis-paginator 的jar包,因此终极的解决办法是在表现层同时加入分页pagehelper的jar包和mybatis的相关 mybatis-paginator 的jar包,如下:

<dependency>
		<groupId>com.github.miemiedev</groupId>
		<artifactId>mybatis-paginator</artifactId>
	</dependency>
	<dependency>
		<groupId>com.github.pagehelper</groupId>
		<artifactId>pagehelper</artifactId>
	</dependency>

4.至此,问题得到了圆满解决,没有了警告,也没有了错误

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值