apache/hadoop · error · IllegalArgumentException

Failed to initialize {tokenProviderClass}

Error message

Failed to initialize {tokenProviderClass}

What it means

Error "Failed to initialize {tokenProviderClass}" thrown in apache/hadoop.

Source

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

              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) {
        throw new TokenAccessProviderException("Unable to load OAuth token provider class.", e);
      }

    } else if (authType == AuthType.Custom) {
      try {
        String configKey = FS_AZURE_ACCOUNT_TOKEN_PROVIDER_TYPE_PROPERTY_NAME;

        Class<? extends CustomTokenProviderAdaptee> customTokenProviderClass
            = getTokenProviderClass(authType, configKey, null,
            CustomTokenProviderAdaptee.class);

        if (customTokenProviderClass == null) {
          throw new IllegalArgumentException(

View on GitHub (pinned to 2add963021)

Solutions

  1. Ensure the token provider class is on the classpath and instantiable; check fs.azure.account.oauth2.* configuration.

When it happens

Trigger: Thrown at hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AbfsConfiguration.java:1567 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/609763703755661b. Report an issue: GitHub.