apache/hadoop · error · TokenAccessProviderException

Failed to initialize custom ClientAssertionProvider: {client

Error message

Failed to initialize custom ClientAssertionProvider: {clientAssertionProviderType}

What it means

Error "Failed to initialize custom ClientAssertionProvider: {clientAssertionProviderType}" thrown in apache/hadoop.

Source

Thrown at hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AbfsConfiguration.java:1554

          String clientAssertionProviderType =
              getPasswordString(FS_AZURE_ACCOUNT_OAUTH_CLIENT_ASSERTION_PROVIDER_TYPE);

          if (clientAssertionProviderType != null && !clientAssertionProviderType.trim().isEmpty()) {
            // Use custom ClientAssertionProvider
            try {
              Class<?> providerClass = Class.forName(clientAssertionProviderType.trim());
              ClientAssertionProvider clientAssertionProvider =
                  (ClientAssertionProvider) providerClass.getDeclaredConstructor().newInstance();

              // Initialize the provider with configuration
              clientAssertionProvider.initialize(rawConfig, accountName);

              tokenProvider = new WorkloadIdentityTokenProvider(
                  authority, tenantGuid, clientId, clientAssertionProvider);
              LOG.trace("WorkloadIdentityTokenProvider initialized with custom ClientAssertionProvider: {}",
                  clientAssertionProviderType);
            } catch (Exception e) {
              throw new TokenAccessProviderException(
                  "Failed to initialize custom ClientAssertionProvider: " + clientAssertionProviderType, e);
            }
          } else {
            // Use file-based approach (backward compatibility)
            String tokenFile =
                getTrimmedPasswordString(FS_AZURE_ACCOUNT_OAUTH_TOKEN_FILE,
                AuthConfigurations.DEFAULT_FS_AZURE_ACCOUNT_OAUTH_TOKEN_FILE);
            tokenProvider = new WorkloadIdentityTokenProvider(
                authority, tenantGuid, clientId, tokenFile);
            LOG.trace("WorkloadIdentityTokenProvider initialized with file-based token");
          }
        } else {
          throw new IllegalArgumentException("Failed to initialize " + tokenProviderClass);
        }
        return tokenProvider;
      } catch(IllegalArgumentException e) {
        throw e;
      } catch (Exception e) {

View on GitHub (pinned to 2add963021)

Solutions

  1. Ensure the custom ClientAssertionProvider class is on the classpath, public, and has an accessible constructor; check the logged cause.

When it happens

Trigger: Thrown at hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AbfsConfiguration.java:1554 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22). Data as JSON: /api/errors/ecc2670851ebcd34. Report an issue: GitHub.