[
https://issues.apache.org/jira/browse/HADOOP-17675?focusedWorklogId=592658&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-592658
]
ASF GitHub Bot logged work on HADOOP-17675:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 04/May/21 10:34
Start Date: 04/May/21 10:34
Worklog Time Spent: 10m
Work Description: sodonnel merged pull request #2965:
URL: https://github.com/apache/hadoop/pull/2965
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 592658)
Time Spent: 40m (was: 0.5h)
> LdapGroupsMapping$LdapSslSocketFactory ClassNotFoundException
> -------------------------------------------------------------
>
> Key: HADOOP-17675
> URL: https://issues.apache.org/jira/browse/HADOOP-17675
> Project: Hadoop Common
> Issue Type: Improvement
> Components: common
> Affects Versions: 3.2.2
> Reporter: Tamas Mate
> Assignee: István Fajth
> Priority: Major
> Labels: pull-request-available
> Attachments: stacktrace.txt
>
> Time Spent: 40m
> Remaining Estimate: 0h
>
> Using LdapGroupsMapping with SSL enabled causes ClassNotFoundException when
> it is called through native threads, such as Apache Impala does.
> When a thread is attached to the VM, the currentThread's context classloader
> is null, so when jndi internally tries to use the current thread's context
> classloader to load the socket factory implementation, the
> Class.forname(String, boolean, ClassLoader) method gets a null as the loaderÂ
> uses the bootstrap classloader.
> Meanwhile the LdapGroupsMapping class and the SslSocketFactory defined in it
> is loaded by the application classloader from its classpath.
> As the bootstrap classloader does not have hadoop-common in its classpath,
> when a native thread tries to use/load the LdapGroupsMapping class it can't
> because the bootstrap loader can't load anything from hadoop-common. The
> correct solution seems to be to set the currentThread's context classloader
> to the classloader of LdapGroupsMapping class before initializing the jndi
> internals, and then reset to the original value after, with that we can
> ensure that the behaviour of other things does not change, but this failure
> can be avoided as well.
> Attached the complete stacktrace to this Jira.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]