{"record":{"id":"c4c66242d367bb98","repo":"apache/hadoop","slug":"can-t-find-selectedalgorithm","errorCode":null,"errorMessage":"Can't find {selectedAlgorithm}","messagePattern":"Can't find (.+?)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/SecretManager.java","lineNumber":242,"sourceCode":"  }\n\n  /**\n   * Creates a new {@link KeyGenerator} instance configured with the currently selected\n   * algorithm and key length.\n   *\n   * @return a new {@code KeyGenerator} instance\n   * @throws IllegalArgumentException if the specified algorithm is not available\n   */\n  private static synchronized KeyGenerator createKeyGenerator() {\n    LOG.debug(\"Creating key generator instance {} - {} bit with thread {}\",\n        selectedAlgorithm, selectedLength, Thread.currentThread());\n    try {\n      KeyGenerator keyGen = KeyGenerator.getInstance(selectedAlgorithm);\n      keyGen.init(selectedLength);\n      keygenInitialized = true;\n      return keyGen;\n    } catch (NoSuchAlgorithmException nsa) {\n      throw new IllegalArgumentException(\"Can't find \" + selectedAlgorithm, nsa);\n    }\n  }\n\n  /**\n   * Creates a new {@link Mac} instance using the currently selected algorithm.\n   *\n   * @return a new {@code Mac} instance\n   * @throws IllegalArgumentException if the specified algorithm is not available\n   */\n  private static synchronized Mac createMac() {\n    LOG.debug(\"Creating mac instance {} with thread {}\", selectedAlgorithm, Thread.currentThread());\n    try {\n      Mac mac = Mac.getInstance(selectedAlgorithm);\n      macInitialized = true;\n      return mac;\n    } catch (NoSuchAlgorithmException nsa) {\n      throw new IllegalArgumentException(\"Can't find \" + selectedAlgorithm, nsa);\n    }","sourceCodeStart":224,"sourceCodeEnd":260,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/SecretManager.java#L224-L260","documentation":"Error \"Can't find {selectedAlgorithm}\" thrown in apache/hadoop.","triggerScenarios":"Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/token/SecretManager.java:242 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set a valid HMAC algorithm: the configured algorithm '{selectedAlgorithm}' is not available in this JVM. Use a supported name such as 'HmacSHA1' and check the provider/security configuration."],"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"}