{"record":{"id":"a306612787e816d4","repo":"apache/hadoop","slug":"key-name-not-found-a30661","errorCode":null,"errorMessage":"Key ${name} not found","messagePattern":"Key (.+?) not found","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/UserProvider.java","lineNumber":120,"sourceCode":"  @Override\n  public synchronized void deleteKey(String name) throws IOException {\n    Metadata meta = getMetadata(name);\n    if (meta == null) {\n      throw new IOException(\"Key \" + name + \" does not exist in \" + this);\n    }\n    for(int v=0; v < meta.getVersions(); ++v) {\n      credentials.removeSecretKey(new Text(buildVersionName(name, v)));\n    }\n    credentials.removeSecretKey(new Text(name));\n    cache.remove(name);\n  }\n\n  @Override\n  public synchronized KeyVersion rollNewVersion(String name,\n                                    byte[] material) throws IOException {\n    Metadata meta = getMetadata(name);\n    if (meta == null) {\n      throw new IOException(\"Key \" + name + \" not found\");\n    }\n    if (meta.getBitLength() != 8 * material.length) {\n      throw new IOException(\"Wrong key length. Required \" +\n          meta.getBitLength() + \", but got \" + (8 * material.length));\n    }\n    int nextVersion = meta.addVersion();\n    credentials.addSecretKey(new Text(name), meta.serialize());\n    String versionName = buildVersionName(name, nextVersion);\n    credentials.addSecretKey(new Text(versionName), material);\n    return new KeyVersion(name, versionName, material);\n  }\n\n  @Override\n  public String toString() {\n    return SCHEME_NAME + \":///\";\n  }\n\n  @Override","sourceCodeStart":102,"sourceCodeEnd":138,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/UserProvider.java#L102-L138","documentation":"Error \"Key ${name} not found\" thrown in apache/hadoop.","triggerScenarios":"Raised at runtime when the documented precondition or configuration requirement for this operation is violated.","commonSituations":"Misconfigured or missing property, invalid user input, or calling the API before its prerequisites are met.","solutions":["Create the named key before deleting or reading it."],"exampleFix":"hadoop key create keyname before the operation.","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-23T01:17:44.959Z"}