{"record":{"id":"a925eb8d8bc34924","repo":"eclipse-vertx/vert.x","slug":"alias-does-not-exist-in-the-keystore","errorCode":null,"errorMessage":"alias does not exist in the keystore: ","messagePattern":"alias does not exist in the keystore: ","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"vertx-core/src/main/java/io/vertx/core/net/impl/KeyStoreHelper.java","lineNumber":255,"sourceCode":"    }\n\n    return names;\n  }\n\n  public static KeyStore loadKeyStore(String type, String provider, String password, Supplier<Buffer> value, String alias) throws Exception {\n    Objects.requireNonNull(type);\n    KeyStore ks = provider == null ? KeyStore.getInstance(type) : KeyStore.getInstance(type, provider);\n    Buffer keystoreBuffer = value.get();\n    if (keystoreBuffer == null) {\n      ks.load(null, password != null ? password.toCharArray() : null);\n    } else {\n      try (InputStream in = new ByteArrayInputStream(value.get().getBytes())) {\n        ks.load(in, password != null ? password.toCharArray() : null);\n      }\n    }\n    if (alias != null) {\n      if (!ks.containsAlias(alias)) {\n        throw new IllegalArgumentException(\"alias does not exist in the keystore: \" + alias);\n      }\n      List<String> ksAliases = Collections.list(ks.aliases());\n      for (String ksAlias : ksAliases) {\n        if (!alias.equals(ksAlias)) {\n          ks.deleteEntry(ksAlias);\n        }\n      }\n    }\n    return ks;\n  }\n\n  public static KeyStore loadKeyCert(List<Buffer> keyValue, List<Buffer> certValue) throws Exception {\n    if (keyValue.size() < certValue.size()) {\n      throw new VertxException(\"Missing private key\");\n    } else if (keyValue.size() > certValue.size()) {\n      throw new VertxException(\"Missing X.509 certificate\");\n    }\n    final KeyStore keyStore = createEmptyKeyStore();","sourceCodeStart":237,"sourceCodeEnd":273,"githubUrl":"https://github.com/eclipse-vertx/vert.x/blob/fb308bd8c3f12c79f4ae89bef67fadf6c80d036e/vertx-core/src/main/java/io/vertx/core/net/impl/KeyStoreHelper.java#L237-L273","documentation":"Keystore validation in KeyStoreHelper.loadKeyStore: an alias filter was requested, but the keystore does not contain an entry with that alias name. The alias is appended to the message; the input at fault is the alias option configured on the KeyStoreOptions.","triggerScenarios":"Thrown at vertx-core/src/main/java/io/vertx/core/net/impl/KeyStoreHelper.java:255 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use an alias that exists in the keystore (list entries with keytool -list)","Remove the alias filter if the whole keystore should be used","Check for case-sensitive alias mismatches"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fb308bd8c3f12c79f4ae89bef67fadf6c80d036e","analyzedAt":"2026-09-06T11:37:12.241Z","contentChangedAt":"2026-09-06T11:37:12.241Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}