{"record":{"id":"ecc2670851ebcd34","repo":"apache/hadoop","slug":"failed-to-initialize-custom-clientassertionprovide","errorCode":null,"errorMessage":"Failed to initialize custom ClientAssertionProvider: {clientAssertionProviderType}","messagePattern":"Failed to initialize custom ClientAssertionProvider: (.+?)","errorType":"validation","errorClass":"TokenAccessProviderException","httpStatus":null,"severity":"error","filePath":"hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AbfsConfiguration.java","lineNumber":1554,"sourceCode":"          String clientAssertionProviderType =\n              getPasswordString(FS_AZURE_ACCOUNT_OAUTH_CLIENT_ASSERTION_PROVIDER_TYPE);\n\n          if (clientAssertionProviderType != null && !clientAssertionProviderType.trim().isEmpty()) {\n            // Use custom ClientAssertionProvider\n            try {\n              Class<?> providerClass = Class.forName(clientAssertionProviderType.trim());\n              ClientAssertionProvider clientAssertionProvider =\n                  (ClientAssertionProvider) providerClass.getDeclaredConstructor().newInstance();\n\n              // Initialize the provider with configuration\n              clientAssertionProvider.initialize(rawConfig, accountName);\n\n              tokenProvider = new WorkloadIdentityTokenProvider(\n                  authority, tenantGuid, clientId, clientAssertionProvider);\n              LOG.trace(\"WorkloadIdentityTokenProvider initialized with custom ClientAssertionProvider: {}\",\n                  clientAssertionProviderType);\n            } catch (Exception e) {\n              throw new TokenAccessProviderException(\n                  \"Failed to initialize custom ClientAssertionProvider: \" + clientAssertionProviderType, e);\n            }\n          } else {\n            // Use file-based approach (backward compatibility)\n            String tokenFile =\n                getTrimmedPasswordString(FS_AZURE_ACCOUNT_OAUTH_TOKEN_FILE,\n                AuthConfigurations.DEFAULT_FS_AZURE_ACCOUNT_OAUTH_TOKEN_FILE);\n            tokenProvider = new WorkloadIdentityTokenProvider(\n                authority, tenantGuid, clientId, tokenFile);\n            LOG.trace(\"WorkloadIdentityTokenProvider initialized with file-based token\");\n          }\n        } else {\n          throw new IllegalArgumentException(\"Failed to initialize \" + tokenProviderClass);\n        }\n        return tokenProvider;\n      } catch(IllegalArgumentException e) {\n        throw e;\n      } catch (Exception e) {","sourceCodeStart":1536,"sourceCodeEnd":1572,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AbfsConfiguration.java#L1536-L1572","documentation":"Error \"Failed to initialize custom ClientAssertionProvider: {clientAssertionProviderType}\" thrown in apache/hadoop.","triggerScenarios":"Thrown at hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AbfsConfiguration.java:1554 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the custom ClientAssertionProvider class is on the classpath, public, and has an accessible constructor; check the logged cause."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}