栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

Correct the classpath of your application so that it contains compatible versions of the classes com

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Correct the classpath of your application so that it contains compatible versions of the classes com

大家好,我是雄雄,欢迎关注微信公众号雄雄的小课堂

在使用springboot集成camunda卡蒙达工作流引擎时报错,报错信息如下:

Description:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

com.baomidou.mybatisplus.core.MybatisMapperAnnotationBuilder.getLanguageDriver(MybatisMapperAnnotationBuilder.java:385)

The following method did not exist:

org.apache.ibatis.session.Configuration.getLanguageDriver(Ljava/lang/Class;)Lorg/apache/ibatis/scripting/LanguageDriver;
The calling method’s class, com.baomidou.mybatisplus.core.MybatisMapperAnnotationBuilder, was loaded from the following location:

jar:file:/G:/repository/com/baomidou/mybatis-plus-core/3.5.1/mybatis-plus-core-3.5.1.jar!/com/baomidou/mybatisplus/core/MybatisMapperAnnotationBuilder.class

The called method’s class, org.apache.ibatis.session.Configuration, is available from the following locations:

jar:file:/G:/repository/org/mybatis/mybatis/3.4.4/mybatis-3.4.4.jar!/org/apache/ibatis/session/Configuration.class

The called method’s class hierarchy was loaded from the following locations:

org.apache.ibatis.session.Configuration: file:/G:/repository/org/mybatis/mybatis/3.4.4/mybatis-3.4.4.jar

Action:

Correct the classpath of your application so that it contains compatible versions of the classes com.baomidou.mybatisplus.core.MybatisMapperAnnotationBuilder and org.apache.ibatis.session.Configuration

解决方法

这个报错原因是因为我框架里面本身已经引入了mybatis的依赖了,而camunda里面也带了mybatis,所以只需要在引入camunda的时候排除掉mybatis即可。
原来代码:

	
			org.camunda.bpm.springboot
			camunda-bpm-spring-boot-starter
			3.4.0
		
		
			org.camunda.bpm.springboot
			camunda-bpm-spring-boot-starter-rest
			3.4.0
		
		
			org.camunda.bpm.springboot
			camunda-bpm-spring-boot-starter-webapp
			3.4.0
		

解决后的代码:


			org.camunda.bpm.springboot
			camunda-bpm-spring-boot-starter
			
				
					org.mybatis
					mybatis
				
			
			3.4.0
		
		
			org.camunda.bpm.springboot
			camunda-bpm-spring-boot-starter-rest
			
				
					org.mybatis
					mybatis
				
			
			3.4.0
		
		
			org.camunda.bpm.springboot
			camunda-bpm-spring-boot-starter-webapp
			
				
					org.mybatis
					mybatis
				
			
			3.4.0
		

刷新maven依赖即可解决问题。

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/1028055.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号