当前位置:网站首页>Record a jar package conflict resolution process
Record a jar package conflict resolution process
2022-07-03 16:06:00 【Longchi Xiaosheng】
Problem description :
I'm doing a function , Need to use org.apache.curator Under the curator-framework jar package , An error is reported during program operation , Compare other items 、 Looking up the data, we found that curator-framework Package version is too high , No corresponding method was found , After excluding the package of higher version , Start up project error , According to the startup log, it is found that com.google.guva.guava Of jar Packet collision , Reintroduce guava Package problem solving .
1、 Program running error ,jar Packet collision
Error message :
java.lang.NoSuchMethodError: org.apache.curator.framework.api.CreateBuilder.creatingParentContainersIfNeeded()Lorg/apache/curator/framework/api/ProtectACLCreateModePathAndBytesable;
Problem investigation and solution :
To find the way :org.apache.curator.framework.api.CreateBuilder.creatingParentContainersIfNeeded
There is no way creatingParentContainersIfNeeded, And found that curator There are two versions under the package ,4.0.1 and 2.9.1, Then I compared the previous projects to curator The version is 2.9.1, Sure is Package version conflicts , Should introduce curator-framework 2.9.1 Version package of .
lookup curator-framework Quote trees ,idea Of terminal Carry out orders
mvn dependency:tree -Dverbose -Dincludes=org.apache.curator:curator-framework
maven Rely on trees :
Reference found 4.0.1 Version of pom And exclude :
After exclusion :
2、 Project start error ,jar Packet collision :
After the above problems are solved , Start up project error :
The main idea of the error message description is not found jar Bag sameThreadExecutor Method , again jar The conflict ,23.0 Version of guava Package does not have this method .
An attempt was made to call the method com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor()Lcom/google/common/util/concurrent/ListeningExecutorService; but it does not exist. Its class, com.google.common.util.concurrent.MoreExecutors, is available from the following locations:
jar:file:/C:/Users/Administrator/.m2/repository/com/google/guava/guava/23.0/guava-23.0.jar!/com/google/common/util/concurrent/MoreExecutors.class
It was loaded from the following location:
file:/C:/Users/Administrator/.m2/repository/com/google/guava/guava/23.0/guava-23.0.jar
Action:
Correct the classpath of your application so that it contains a single, compatible version of com.google.common.util.concurrent.MoreExecutors
Compare other items ,guava Package introduces 20.0 Version of .
stay pom To reintroduce pom rely on , Cover 23.0 Version of the package , The project started successfully :
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>20.0</version>
</dependency>
maven View dependent commands :
View specified jar The dependency tree of the package :
mvn dependency:tree -Dverbose -Dincludes=org.apache.curator:curator-framework
View all of the items jar The dependency tree of the package :
mvn dependency:tree
View all of the items jar The dependency tree of the package , And output to the specified file :
mvn dependency:tree>D:\maven.txt
边栏推荐
- 远程文件包含实操
- Vs2017 is driven by IP debugging (dual machine debugging)
- 几种常见IO模型的原理
- Break through 1million, sword finger 2million!
- 用通达信炒股开户安全吗?
- How are integer and floating-point types stored in memory
- Low level version of drawing interface (explain each step in detail)
- Srs4.0+obs studio+vlc3 (environment construction and basic use demonstration)
- 使用AUR下载并安装常用程序
- Getting started with Message Oriented Middleware
猜你喜欢
Redis在Windows以及Linux系统下的安装
“用Android复刻Apple产品UI”(2)——丝滑的AppStore卡片转场动画
Stm32f103c8t6 firmware library lighting
[web security] - [SQL injection] - error detection injection
【OpenCV 例程200篇】217. 鼠标交互获取多边形区域(ROI)
How to thicken the brush in the graphical interface
Microservice API gateway
子类隐藏父类的同名函数
Automatic generation of client code from flask server code -- Introduction to flask native stubs Library
请做好3年内随时失业的准备?
随机推荐
远程文件包含实操
Getting started with Message Oriented Middleware
突破100万,剑指200万!
[combinatorics] combinatorial identities (review of eight combinatorial identities | product of combinatorial identities 1 | proof | use scenario | general method for finding combinatorial numbers)
Microservice API gateway
pyinstaller不是内部或外部命令,也不是可运行的程序 或批处理文件
Project -- high concurrency memory pool
[系统安全] 四十三.Powershell恶意代码检测系列 (5)抽象语法树自动提取万字详解
Rk3399 platform development series explanation (WiFi) 5.54. What is WiFi wireless LAN
Go language self-study series | if else if statement in golang
Subclass hides the function with the same name of the parent class
[combinatorics] combinatorial identity (sum of combinatorial identity products 1 | sum of products 1 proof | sum of combinatorial identity products 2 | sum of products 2 proof)
六月 致 -.-- -..- -
嵌入式开发:避免开源软件的7个理由
pycharm错Error updating package list: connect timed out
Redis高可用与持久化
Famous blackmail software stops operation and releases decryption keys. Most hospital IOT devices have security vulnerabilities | global network security hotspot on February 14
Three dimensional reconstruction of deep learning
记一次jar包冲突解决过程
用通达信炒股开户安全吗?