<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: com.alibaba:dubbo-rpc-thrift:jar:2.6.2</li>
<li>Operating System version: Windows</li>
<li>Java version: Jdk 1.7</li>
</ul>
<h3 dir="auto">Descirption</h3>
<p dir="auto">Hi, there are two versions of <strong>org.apache.httpcomponents:httpcore:jar</strong> exist in com.alibaba:dubbo-rpc-thrift, and only <strong>org.apache.httpcomponents:httpcore:jar:4.1.3</strong> can be loaded during packaging process based on "nearest wins strategy". However, <strong>class org.apache.http.util.Args</strong> only included in <strong>org.apache.httpcomponents:httpcore:jar:4.4.6:compile</strong> which is shadowed by Maven. When your project referencing the missing class, java.lang.NoClassDefFoundError will be thrown.</p>
<h3 dir="auto">Dependency tree</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="com.alibaba:dubbo-rpc-thrift:jar:2.6.2
+- com.alibaba:dubbo-rpc-api:jar:2.6.2:compile
+- org.apache.thrift:libthrift:jar:0.8.0:compile
|  +- org.slf4j:slf4j-api:jar:1.7.25:compile (version managed from 1.5.8)
|  +- commons-lang:commons-lang:jar:2.5:compile
|  +- org.apache.httpcomponents:httpclient:jar:4.5.3:compile (version managed from 4.1.2)
|  |  +- (org.apache.httpcomponents:httpcore:jar:4.4.6:compile - **omitted for conflict with 4.1.3**)
|  |  +- (commons-logging:commons-logging:jar:1.2:compile - version managed from 1.1.1; omitted for duplicate)
|  |  \- commons-codec:commons-codec:jar:1.9:compile
|  \- org.apache.httpcomponents:httpcore:jar:4.1.3:compile"><pre class="notranslate"><code class="notranslate">com.alibaba:dubbo-rpc-thrift:jar:2.6.2
+- com.alibaba:dubbo-rpc-api:jar:2.6.2:compile
+- org.apache.thrift:libthrift:jar:0.8.0:compile
|  +- org.slf4j:slf4j-api:jar:1.7.25:compile (version managed from 1.5.8)
|  +- commons-lang:commons-lang:jar:2.5:compile
|  +- org.apache.httpcomponents:httpclient:jar:4.5.3:compile (version managed from 4.1.2)
|  |  +- (org.apache.httpcomponents:httpcore:jar:4.4.6:compile - **omitted for conflict with 4.1.3**)
|  |  +- (commons-logging:commons-logging:jar:1.2:compile - version managed from 1.1.1; omitted for duplicate)
|  |  \- commons-codec:commons-codec:jar:1.9:compile
|  \- org.apache.httpcomponents:httpcore:jar:4.1.3:compile
</code></pre></div>
<h3 dir="auto">Stack trace</h3>
<p dir="auto">Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/http/util/Args<br>
at org.apache.http.impl.conn.Wire.output(Wire.java:110)<br>
at org.apache.http.impl.conn.LoggingOutputStream.write(LoggingOutputStream.java:73)<br>
at com.alibaba.dubbo.rpc.protocol.thrift.io.RandomAccessByteArrayOutputStream.writeTo(RandomAccessByteArrayOutputStream.java:93)<br>
at com.alibaba.dubbo.rpc.protocol.thrift.io.RandomAccessByteArrayOutputStreamTest.main(RandomAccessByteArrayOutputStreamTest.java:11)<br>
Caused by: java.lang.ClassNotFoundException: org.apache.http.util.Args<br>
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)<br>
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)<br>
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)<br>
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)<br>
... 4 more</p>
<h3 dir="auto">Suggested solution</h3>
<p dir="auto">I found that you only deal with the dependency conflict issue for httpclient in version mangement file.<br>
Could you please set the version of httpcore to 4.4.6 (dependencyManagement) in pom.xml?</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have searched the <a href="https://github.com/apache/dubbo/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I have checked the <a href="https://github.com/apache/dubbo/blob/master/FAQ.md">FAQ</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h3 dir="auto">Environment</h3>
<ul dir="auto">
<li>Dubbo version: 2.7.4</li>
<li>Operating System version: windows10</li>
<li>Java version: 1.8</li>
</ul>
<h3 dir="auto">Actual Result</h3>
<p dir="auto">How can I use dubbo2.7.4 in maven project?Which repository can provider 2.7.4, and how to configure in the pom.xml and setting.xml? Thanks :)</p>