This is an automated email from the ASF dual-hosted git repository.

nic pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kylin.git


The following commit(s) were added to refs/heads/master by this push:
     new fc5bf0a  KYLIN-4523 Fix 'LinkageError' error after upgrading 
httpclient version to 4.3.6
fc5bf0a is described below

commit fc5bf0a1c3747e521491ecfa7542f898cbf99fc7
Author: Zhichao Zhang <441586...@qq.com>
AuthorDate: Tue May 26 21:41:38 2020 +0800

    KYLIN-4523 Fix 'LinkageError' error after upgrading httpclient version to 
4.3.6
    
    Problems:
    After upgrading httpclient version to 4.3.6, on CDH 5.7 env it will lead to 
LinkageError occured, because it loades 'HttpContext' class in two different 
ClassLoader (CustomizedWebappClassloader and AppClassLoader):
    
    Error message below:
    java.lang.LinkageError: loader constraint violation: when resolving method 
"org.apache.http.protocol.HttpCoreContext.<init>(Lorg/apache/http/protocol/HttpContext;)V"
 the class loader (instance of 
org/apache/kylin/ext/CustomizedWebappClassloader) of the current class, 
org/apache/http/client/protocol/HttpClientContext, and the class loader 
(instance of sun/misc/Launcher$AppClassLoader) for the method's defining class, 
org/apache/http/protocol/HttpCoreContext, have different Class object [...]
---
 server/pom.xml | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/server/pom.xml b/server/pom.xml
index f92518b..e0ec203 100644
--- a/server/pom.xml
+++ b/server/pom.xml
@@ -59,6 +59,11 @@
         </dependency>
 
         <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpclient</artifactId>
+        </dependency>
+
+        <dependency>
             <groupId>com.thetransactioncompany</groupId>
             <artifactId>cors-filter</artifactId>
             <exclusions>
@@ -111,6 +116,14 @@
                     <groupId>javax.servlet.jsp</groupId>
                     <artifactId>jsp-api</artifactId>
                 </exclusion>
+                <exclusion>
+                    <groupId>org.apache.httpcomponents</groupId>
+                    <artifactId>httpclient</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.httpcomponents</groupId>
+                    <artifactId>httpcore</artifactId>
+                </exclusion>
             </exclusions>
         </dependency>
 

Reply via email to