apache/hadoop · error · SASTokenProviderException

Unable to load SAS token provider class

Error message

Unable to load SAS token provider class: {e}

What it means

Catch-all wrap: an unexpected Exception occurred while loading or constructing the SAS token provider class; the underlying cause is attached for diagnosis of classpath or provider init problems.

Solutions

  1. Ensure the SAS token provider class named in configuration is on the classpath and can be loaded.
Defensive patterns

Strategy: try-catch

When it happens

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

Appendix: source

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

        SASTokenProvider sasTokenProvider = ReflectionUtils.newInstance(
            customSasTokenProviderImplementation, rawConfig);
        if (sasTokenProvider == null) {
          throw new SASTokenProviderException(String.format(
              "Failed to initialize %s", customSasTokenProviderImplementation));
        }
        LOG.trace("Initializing {}", customSasTokenProviderImplementation.getName());
        sasTokenProvider.initialize(rawConfig, accountName);
        LOG.trace("{} init complete", customSasTokenProviderImplementation.getName());
        return sasTokenProvider;
      } else {
        LOG.trace("Using FixedSASTokenProvider implementation");
        FixedSASTokenProvider fixedSASTokenProvider = new FixedSASTokenProvider(configuredFixedToken);
        return fixedSASTokenProvider;
      }
    } catch (SASTokenProviderException e) {
      throw e;
    } catch (Exception e) {
      throw new SASTokenProviderException(
          "Unable to load SAS token provider class: " + e, e);
    }
  }

  /**
   * Returns the SASTokenProvider implementation to be used to generate user-bound SAS token.
   * Custom implementation of {@link SASTokenProvider} under th config
   * "fs.azure.sas.token.provider.type" needs to be provided.
   * @param authType authentication type
   * @return sasTokenProvider object based on configurations provided
   * @throws AzureBlobFileSystemException is user-bound SAS token provider initialization fails
   */
  public SASTokenProvider getUserBoundSASTokenProvider(AuthType authType)
      throws AzureBlobFileSystemException {

    try {
      Class<? extends SASTokenProvider> customSasTokenProviderImplementation =
          getTokenProviderClass(authType, FS_AZURE_SAS_TOKEN_PROVIDER_TYPE,

View on GitHub (pinned to 2add963021)