You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by "Bing-ok (Jira)" <ji...@apache.org> on 2020/08/16 01:46:00 UTC

[jira] [Comment Edited] (ATLAS-3906) “NoSuchMethodErrors” due to multiple versions of org.apache.curator:curator-client:jar

    [ https://issues.apache.org/jira/browse/ATLAS-3906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17168688#comment-17168688 ] 

Bing-ok edited comment on ATLAS-3906 at 8/16/20, 1:45 AM:
----------------------------------------------------------

[~kevalbhatt] Could you help me review this issue? Thx :P 


was (Author: bing-ok):
[~nixon] Could you help me review this issue? Thx :P 

> “NoSuchMethodErrors” due to multiple versions of org.apache.curator:curator-client:jar
> --------------------------------------------------------------------------------------
>
>                 Key: ATLAS-3906
>                 URL: https://issues.apache.org/jira/browse/ATLAS-3906
>             Project: Atlas
>          Issue Type: Bug
>    Affects Versions: 3.0.0
>            Reporter: Bing-ok
>            Priority: Major
>
> Hi, there are multiple versions of _*org.apache.curator:curator-client*_ in _*atlas/server-api*_. As shown in the following dependency tree, according to Maven's “nearest wins” strategy, only _*org.apache.curator:curator-client:4.0.1*_ can be loaded, _*org.apache.curator:curator-client:2.12.0*_ will be shadowed.
> As _*org.apache.curator:curator-client:2.12.0*_ has not been loaded during the building process, several methods are missing. However, the missing methods:
> 1. _*org.codelibs.core.lang.StringUtil: java.lang.String newStringUnsafe(char[])*_
> {noformat}
> paths------
> <org.apache.atlas.RequestContext: org.apache.atlas.model.instance.AtlasEntity getEntity(java.lang.String)> atlas\server-api\target\classes
> <org.apache.curator.shaded.com.google.common.collect.Maps$AsMapView: java.lang.Object get(java.lang.Object)> Repositories\org\apache\curator\curator-client\4.0.1\curator-client-4.0.1.jar
> <org.apache.curator.framework.imps.CuratorFrameworkImpl$5: java.lang.Object apply(java.lang.Object)> Repositories\org\apache\curator\curator-framework\4.0.1\curator-framework-4.0.1.jar
> <org.apache.curator.framework.imps.CuratorFrameworkImpl$5: java.lang.Void apply(org.apache.curator.framework.api.CuratorListener)> Repositories\org\apache\curator\curator-framework\4.0.1\curator-framework-4.0.1.jar
> <org.apache.curator.utils.ThreadUtils: void checkInterrupted(java.lang.Throwable)>{noformat}
>  
> The above missing methods are actually referenced by _*atlas/server-api*_, which will cause “NoSuchMethodErrors” at runtime.
> Suggested fixing solutions:
> 1. Upgrade dependency *_org.apache.hadoop:hadoop-common_* from _*3.1.1*_ to *_3.3.0_*. Because one conflicting library version _*org.apache.curator:curator-client:2.12.0*_ is transitively introduced by *_org.apache.hadoop:hadoop-common:3.1.1_*. Upgrading dependency *_org.apache.hadoop:hadoop-common_* from _*3.1.1*_ to *_3.3.0_* can solve this dependency conflict. 
> 2. Directly declare dependency _*org.apache.curator:curator-client:2.12.0*_.
> 3. Use configuration attribute <dependencyManagement> to unify the version of library _*org.apache.curator:curator-client*_ to be _*2.12.0*_ in _*atlas/server-api*_'s pom file.
> Please let me know which solution do you prefer? I can submit a PR to fix it.
> Thank you very much for your attention.
> Best regards,
> Dependency tree----
> [INFO] org.apache.atlas:atlas-server-api:jar:3.0.0-SNAPSHOT
> [INFO] \- org.apache.hadoop:hadoop-common:jar:3.1.1:compile
> [INFO] +- org.apache.hadoop:hadoop-auth:jar:3.1.1:compile
> [INFO] | \- org.apache.curator:curator-framework:jar:4.0.1:compile (version managed from 2.12.0)
> [INFO] | \- _*(org.apache.curator:curator-client:jar:4.0.1:compile - version managed from 2.12.0; omitted for duplicate)*_
> [INFO] \- _*org.apache.curator:curator-client:jar:4.0.1:compile*_
> </details>



--
This message was sent by Atlassian Jira
(v8.3.4#803005)