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 {