baomidou / mybatis-plus

An powerful enhanced toolkit of MyBatis for simplify development
https://baomidou.com
Apache License 2.0
16.3k stars 4.3k forks source link

void org.apache.ibatis.session.Configuration.parsePendingMethods(boolean) #6063

Closed bchengwang closed 5 months ago

bchengwang commented 5 months ago

当前使用版本(必填,否则不予处理)

3.5.6

该问题是如何引起的?(确定最新版也有问题再提!!!)


APPLICATION FAILED TO START


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.parse(MybatisMapperAnnotationBuilder.java:122)

The following method did not exist:

'void org.apache.ibatis.session.Configuration.parsePendingMethods(boolean)'

The calling method's class, com.baomidou.mybatisplus.core.MybatisMapperAnnotationBuilder, was loaded from the following location:

jar:file:/D:/DevInstall/Maven/LocalRepository/com/baomidou/mybatis-plus-core/3.5.6/mybatis-plus-core-3.5.6.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:/D:/DevInstall/Maven/LocalRepository/org/mybatis/mybatis/3.5.14/mybatis-3.5.14.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:/D:/DevInstall/Maven/LocalRepository/org/mybatis/mybatis/3.5.14/mybatis-3.5.14.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

重现步骤(如果有就写完整)

使用下面版本

org.springframework.boot spring-boot-dependencies 3.2.4 pom import com.baomidou mybatis-plus-spring-boot3-starter 3.5.6 org.mybatis.spring.boot mybatis-spring-boot-starter 3.0.3 org.mybatis.spring.boot mybatis-spring-boot-starter-test 3.0.3 test

报错信息


APPLICATION FAILED TO START


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.parse(MybatisMapperAnnotationBuilder.java:122)

The following method did not exist:

'void org.apache.ibatis.session.Configuration.parsePendingMethods(boolean)'

The calling method's class, com.baomidou.mybatisplus.core.MybatisMapperAnnotationBuilder, was loaded from the following location:

jar:file:/D:/DevInstall/Maven/LocalRepository/com/baomidou/mybatis-plus-core/3.5.6/mybatis-plus-core-3.5.6.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:/D:/DevInstall/Maven/LocalRepository/org/mybatis/mybatis/3.5.14/mybatis-3.5.14.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:/D:/DevInstall/Maven/LocalRepository/org/mybatis/mybatis/3.5.14/mybatis-3.5.14.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

bchengwang commented 5 months ago

根据排查是因为和mybatis-spring-boot-starter中的mybatis版本冲突

panovr commented 4 months ago

So how to solve this error?

bchengwang commented 4 months ago

@panovr Currently, mybatis-spring-boot-starter is not compatible with the latest version of MyBatis. My current solution is to use version 3.5.5 of MyBatis Plus.