java.lang.ClassNotFoundException: com.github.pagehelper.Page

警告:

警告: 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@5c647e05]
:
java.lang.ClassNotFoundException: com.github.pagehelper.Page
如下图所示:

java.lang.ClassNotFoundException: com.github.pagehelper.Page_第1张图片

原因:主要原意是在pagehelper的中我们使用pageiInfo,pageInfo中使用继承了arrayList的page,所以在服务发布于获取的序列化与反序列化中会去找page,找不到就会报错,但是由于他继承了ArrayList所以不会影响结果。

解决方法:在manager-web项目中,没有导入pageHelper.pom依赖,导入即可解决问题.

	
			com.github.pagehelper
			pagehelper
	

但在我导入上面的依赖时:又出现新的错误

错误:

java.lang.NoClassDefFoundError: org/apache/ibatis/session/RowBounds
    at java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
    at java.lang.Class.getConstructor0(Class.java:3075)
    at java.lang.Class.newInstance(Class.java:412)

java.lang.ClassNotFoundException: com.github.pagehelper.Page_第2张图片

原因:

使用mybatis的通用mapper和分页插件时报的问题。

web工程少mybatis包,通过dubbo调用service接口返回数据时数据转型需要。

解决方法:在manager-web中添加下面依赖即可:

	
		org.mybatis
		mybatis		
	

 

你可能感兴趣的:(java)