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

记一次依赖版本不一致问题的解决记录

完整报错如下

Description:

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

    com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor.<clinit>(PaginationInnerInterceptor.java:70)

The following method did not exist:

    net.sf.jsqlparser.schema.Column.withColumnName(Ljava/lang/String;)Lnet/sf/jsqlparser/schema/Column;

The method's class, net.sf.jsqlparser.schema.Column, is available from the following locations:

    jar:file:/E:/apache-maven-3.8.1-bin/localMaven3.8.1/com/github/jsqlparser/jsqlparser/3.2/jsqlparser-3.2.jar!/net/sf/jsqlparser/schema/Column.class

The class hierarchy was loaded from the following locations:

    net.sf.jsqlparser.schema.Column: file:/E:/apache-maven-3.8.1-bin/localMaven3.8.1/com/github/jsqlparser/jsqlparser/3.2/jsqlparser-3.2.jar
    net.sf.jsqlparser.parser.ASTNodeAccessImpl: file:/E:/apache-maven-3.8.1-bin/localMaven3.8.1/com/github/jsqlparser/jsqlparser/3.2/jsqlparser-3.2.jar


Action:

Correct the classpath of your application so that it contains a single, compatible version of net.sf.jsqlparser.schema.Column


Process finished with exit code 1

1、改报错一般都是版本依赖的问题,首先先去下载maven helper插件
An attempt was made to call a method that does not exist. The attempt was made from the following_第1张图片

2、在启动对于的pom文件查看依赖关系,发现有三处爆红
An attempt was made to call a method that does not exist. The attempt was made from the following_第2张图片
3、这时在爆红出点击右键排除重复依赖
An attempt was made to call a method that does not exist. The attempt was made from the following_第3张图片
4、可是再启动的时候,还是报了同样的错误。此时,去你的本地maven看看存了什么版本
An attempt was made to call a method that does not exist. The attempt was made from the following_第4张图片
An attempt was made to call a method that does not exist. The attempt was made from the following_第5张图片
5、发现jsqlparser有两个依赖引入 可以点击Jump to Source 查看,我刚开始是排除4.3这个版本,这次我排除3.2这个版本
An attempt was made to call a method that does not exist. The attempt was made from the following_第6张图片

An attempt was made to call a method that does not exist. The attempt was made from the following_第7张图片
并把对应得版本在本地仓库删除
An attempt was made to call a method that does not exist. The attempt was made from the following_第8张图片
刷新下依赖,发现正常启动了,搞定。
An attempt was made to call a method that does not exist. The attempt was made from the following_第9张图片
ps:有兴趣提升技术的可以加我wx一起交流。加油鸭!打工人![在这里插入图片描述](https://img-blog.csdnimg.cn/1091bf4029d8430b680fb41bd56a05e.png

你可能感兴趣的:(java,spring,boot,spring)