From 4d4fe07c3cdd5c57c455ef91daac3686b753b9be Mon Sep 17 00:00:00 2001 From: Chris Nauroth Date: Wed, 10 Aug 2016 09:54:31 -0700 Subject: [PATCH] HADOOP-13476. CredentialProviderFactory fails at class loading from libhdfs (JNI). Contributed by Aaron Fabbri. --- .../hadoop/security/alias/CredentialProviderFactory.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/alias/CredentialProviderFactory.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/alias/CredentialProviderFactory.java index 36b4ecb0440..0c9c21f8f81 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/alias/CredentialProviderFactory.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/alias/CredentialProviderFactory.java @@ -45,7 +45,8 @@ public abstract class CredentialProviderFactory { ) throws IOException; private static final ServiceLoader serviceLoader = - ServiceLoader.load(CredentialProviderFactory.class); + ServiceLoader.load(CredentialProviderFactory.class, + CredentialProviderFactory.class.getClassLoader()); public static List getProviders(Configuration conf ) throws IOException {