[
https://issues.apache.org/jira/browse/KYLIN-4523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17117228#comment-17117228
]
ASF subversion and git services commented on KYLIN-4523:
--------------------------------------------------------
Commit fc5bf0a1c3747e521491ecfa7542f898cbf99fc7 in kylin's branch
refs/heads/master from Zhichao Zhang
[ https://gitbox.apache.org/repos/asf?p=kylin.git;h=fc5bf0a ]
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 objects for the
type org/apache/http/protocol/HttpContext used in the signature
> Loading HttpContext class twice leads to LinkageError error.
> ------------------------------------------------------------
>
> Key: KYLIN-4523
> URL: https://issues.apache.org/jira/browse/KYLIN-4523
> Project: Kylin
> Issue Type: Bug
> Reporter: Zhichao Zhang
> Assignee: Zhichao Zhang
> Priority: Minor
> Fix For: v3.1.0
>
>
> After upgrading httpclient 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:
> {code:java}
> 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 objects
> for the type org/apache/http/protocol/HttpContext used in the signature{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)