当前位置:网站首页>Correct the classpath of your application so that it contains compatible versions of the classes com
Correct the classpath of your application so that it contains compatible versions of the classes com
2022-07-26 19:50:00 【穆雄雄】
大家好,我是雄雄,欢迎关注微信公众号雄雄的小课堂
在使用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即可。
原来代码:
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter</artifactId>
<version>3.4.0</version>
</dependency>
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-rest</artifactId>
<version>3.4.0</version>
</dependency>
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-webapp</artifactId>
<version>3.4.0</version>
</dependency>
解决后的代码:
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
</exclusion>
</exclusions>
<version>3.4.0</version>
</dependency>
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-rest</artifactId>
<exclusions>
<exclusion>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
</exclusion>
</exclusions>
<version>3.4.0</version>
</dependency>
<dependency>
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-webapp</artifactId>
<exclusions>
<exclusion>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
</exclusion>
</exclusions>
<version>3.4.0</version>
</dependency>
刷新maven依赖即可解决问题。
边栏推荐
猜你喜欢
![[基础服务] [数据库] ClickHouse的安装和配置](/img/fe/5c24e4c3dc17a6a96985e4fe97024e.png)
[基础服务] [数据库] ClickHouse的安装和配置

深度可分离卷积(DepthwiseSeparableConvolution):Depthwise卷积与Pointwise卷积

EasyCVR设备管理列表页面,分页数据不显示的问题修复

Summary of message queue knowledge points

What are the advantages of digital factory

How can small companies break through with small and beautiful products?
![[record of question brushing] 22. bracket generation](/img/0d/8881fcbcd0e963875dff2946b95865.png)
[record of question brushing] 22. bracket generation

EtherCAT synchronization mode

The first training course was a perfect success (๑ㅂ•) و*

AI 技术,让复杂世界简单化 | TeaTalk·Online 应用实战系列第 2 期
随机推荐
opencv dnn部署onnx模型
Where are the single dogs in the evening of 5.20?
Vs how to read data in MySQL (by the way, the problem of Chinese garbled code is solved through code)
【刷题记录】22. 括号生成
Exchange 2010 SSL certificate installation document
Dio problem summary
AI 技术,让复杂世界简单化 | TeaTalk·Online 应用实战系列第 2 期
Servlet
如何实现一个能处理海量数据的异步任务队列系统(至尊典藏版)
884. 两句话中的不常见单词-哈希表
Usage of Smoothscroll Polyfill plug-in
第一次培训课完美成功(๑•ㅂ•)و*
this指向,最简单的规则记住它
Shell script basic programming commands
Principle and application of one click login of local number (glory Collection Edition)
Parallel execution (II). Multiprocessing
员工辞职还得赔偿公司损失?34岁机长辞职被公司索赔1066万
Strengthen supervision on secret room escape and script killing, and focus on strengthening fire safety and juvenile protection
Arpspoof installation and use
A little cool, explore space with.Net Maui