{"record":{"id":"2e60e7e8a111c847","repo":"apache/hadoop","slug":"at-least-one-of-the-s-and-s-must-be-set","errorCode":null,"errorMessage":"At least one of the \"%s\" and \"%s\" must be set.","messagePattern":"At least one of the \"(.+?)\" and \"(.+?)\" must be set\\.","errorType":"exception","errorClass":"SASTokenProviderException","httpStatus":null,"severity":"error","filePath":"hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AbfsConfiguration.java","lineNumber":1638,"sourceCode":"   * chances of dynamic modifications and spurious situations.<br>\n   * @return sasTokenProvider object based on configurations provided\n   * @throws AzureBlobFileSystemException if SAS token provider initialization fails\n   */\n  public SASTokenProvider getSASTokenProvider() throws AzureBlobFileSystemException {\n    AuthType authType = getEnum(FS_AZURE_ACCOUNT_AUTH_TYPE_PROPERTY_NAME, AuthType.SharedKey);\n    if (authType != AuthType.SAS) {\n      throw new SASTokenProviderException(String.format(\n          \"Invalid auth type: %s is being used, expecting SAS.\", authType));\n    }\n\n    try {\n      Class<? extends SASTokenProvider> customSasTokenProviderImplementation =\n          getTokenProviderClass(authType, FS_AZURE_SAS_TOKEN_PROVIDER_TYPE,\n              null, SASTokenProvider.class);\n      String configuredFixedToken = this.getTrimmedPasswordString(FS_AZURE_SAS_FIXED_TOKEN, EMPTY_STRING);\n\n      if (customSasTokenProviderImplementation == null && configuredFixedToken.isEmpty()) {\n        throw new SASTokenProviderException(String.format(\n            \"At least one of the \\\"%s\\\" and \\\"%s\\\" must be set.\",\n            FS_AZURE_SAS_TOKEN_PROVIDER_TYPE, FS_AZURE_SAS_FIXED_TOKEN));\n      }\n\n      // Prefer Custom SASTokenProvider Implementation if configured.\n      if (customSasTokenProviderImplementation != null) {\n        LOG.trace(\"Using Custom SASTokenProvider implementation because it is given precedence when it is set.\");\n        SASTokenProvider sasTokenProvider = ReflectionUtils.newInstance(\n            customSasTokenProviderImplementation, rawConfig);\n        if (sasTokenProvider == null) {\n          throw new SASTokenProviderException(String.format(\n              \"Failed to initialize %s\", customSasTokenProviderImplementation));\n        }\n        LOG.trace(\"Initializing {}\", customSasTokenProviderImplementation.getName());\n        sasTokenProvider.initialize(rawConfig, accountName);\n        LOG.trace(\"{} init complete\", customSasTokenProviderImplementation.getName());\n        return sasTokenProvider;\n      } else {","sourceCodeStart":1620,"sourceCodeEnd":1656,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AbfsConfiguration.java#L1620-L1656","documentation":"Error \"At least one of the \"%s\" and \"%s\" must be set.\" thrown in apache/hadoop.","triggerScenarios":"Thrown at hadoop-tools/hadoop-azure/src/main/java/org/apache/hadoop/fs/azurebfs/AbfsConfiguration.java:1638 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set at least one of the two named configuration keys required for authentication."],"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"}