当前位置:网站首页>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
边栏推荐
- 记一次jar包冲突解决过程
- do{}while()的妙用
- C language brush questions ~leetcode and simple questions of niuke.com
- 【OpenCV 例程200篇】217. 鼠标交互获取多边形区域(ROI)
- 深度学习之三维重建
- The difference between mutually exclusive objects and critical areas
- Slam learning notes - build a complete gazebo multi machine simulation slam from scratch (II)
- Introduction series of software reverse cracking (1) - common configurations and function windows of xdbg32/64
- App mobile terminal test [3] ADB command
- Detailed explanation of string function and string function with unlimited length
猜你喜欢

"Remake Apple product UI with Android" (3) - elegant statistical chart

Redis在Windows以及Linux系统下的安装

Reading notes of "micro service design" (Part 2)

UnityShader——MaterialCapture材质捕捉效果 (翡翠斧头)
![App mobile terminal test [3] ADB command](/img/f1/4bff6e66b77d0f867bf7237019e982.png)
App mobile terminal test [3] ADB command

记一次jar包冲突解决过程
![[redis foundation] understand redis persistence mechanism together (rdb+aof graphic explanation)](/img/68/3721975cf33fcfacc28dc4d3d6a5ca.jpg)
[redis foundation] understand redis persistence mechanism together (rdb+aof graphic explanation)

From "zero sum game" to "positive sum game", PAAS triggered the third wave of cloud computing

Unity function - unity offline document download and use
![[200 opencv routines] 217 Mouse interaction to obtain polygon area (ROI)](/img/04/460734209ec315c5c02cb3fae4bf0e.png)
[200 opencv routines] 217 Mouse interaction to obtain polygon area (ROI)
随机推荐
[200 opencv routines] 217 Mouse interaction to obtain polygon area (ROI)
Pyinstaller is not an internal or external command, nor is it a runnable program or batch file
[proteus simulation] 8 × 8LED dot matrix screen imitates elevator digital scrolling display
Embedded development: seven reasons to avoid open source software
[list to map] collectors Tomap syntax sharing (case practice)
子类隐藏父类的同名函数
Pychart error updating package list: connect timed out
Semi supervised learning
CString在多线程中的问题
Win32 create window and button (lightweight)
Brush questions -- sword finger offer
Please be prepared to lose your job at any time within 3 years?
坚持输出需要不断学习
Go语言自学系列 | golang中的if else语句
一些事情的反思
The difference between calling by value and simulating calling by reference
记一次jar包冲突解决过程
关于网页中的文本选择以及统计选中文本长度
Download and install common programs using AUR
半监督学习