{"record":{"id":"7ba557ac6eb8c872","repo":"eclipse-vertx/vert.x","slug":"invalid-configuration","errorCode":null,"errorMessage":"Invalid configuration","messagePattern":"Invalid configuration","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"vertx-core/src/main/java/io/vertx/core/net/impl/quic/TokenManager.java","lineNumber":94,"sourceCode":"    KeyStore.Entry entry = null;\n    if (conf instanceof KeyStoreOptionsBase) {\n      KeyStoreOptionsBase keyStoreOptions = (KeyStoreOptionsBase) conf;\n      KeyStoreHelper helper = keyStoreOptions.getHelper(vertx);\n      KeyStore keystore = helper.store();\n      Enumeration<String> aliases = keystore.aliases();\n      if (aliases.hasMoreElements()) {\n        entry = keystore.getEntry(aliases.nextElement(), new KeyStore.PasswordProtection(keyStoreOptions.getPassword().toCharArray()));\n      }\n    } else if (conf instanceof PemKeyCertOptions) {\n      PemKeyCertOptions pemKeyCertOptions = (PemKeyCertOptions) conf;\n      KeyStoreHelper helper = pemKeyCertOptions.getHelper(vertx);\n      KeyStore keystore = helper.store();\n      Enumeration<String> aliases = keystore.aliases();\n      if (aliases.hasMoreElements()) {\n        entry = keystore.getEntry(aliases.nextElement(), new KeyStore.PasswordProtection(KeyStoreHelper.DUMMY_PASSWORD.toCharArray()));\n      }\n    } else {\n      throw new IllegalArgumentException(\"Invalid configuration\");\n    }\n    if (entry != null) {\n      signingAlgorithm = SigningAlgorithm.create(entry);\n      length = signingAlgorithm.signer().sign(new byte[0]).length;\n    } else {\n      throw new IllegalArgumentException(\"KeyStore does not contains a valid entry\");\n    }\n  }\n\n  public SigningAlgorithm signingAlgorithm() {\n    return signingAlgorithm;\n  }\n\n  public byte[] generateToken(byte[] payload) {\n    ByteBuf out = Unpooled.buffer();\n    writeToken(out, Unpooled.copiedBuffer(payload), new InetSocketAddress(NetUtil.LOCALHOST4, 8080));\n    return ByteBufUtil.getBytes(out);\n  }","sourceCodeStart":76,"sourceCodeEnd":112,"githubUrl":"https://github.com/eclipse-vertx/vert.x/blob/fb308bd8c3f12c79f4ae89bef67fadf6c80d036e/vertx-core/src/main/java/io/vertx/core/net/impl/quic/TokenManager.java#L76-L112","documentation":"Initialization failure in TokenManager.init: the configured key/certificate options object is not a supported type (not KeyStoreOptionsBase, not PemKeyCertOptions, or another unrecognized configuration class), so the token-signing key material cannot be extracted. The message 'Invalid configuration' is a generic sentinel; the input at fault is the conf object configured for QUIC tokens.","triggerScenarios":"Thrown at vertx-core/src/main/java/io/vertx/core/net/impl/quic/TokenManager.java:94 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Configure token key material using KeyStoreOptions/JksOptions/Pkcs12Options or PemKeyCertOptions","Fix the QUIC token options construction"],"exampleFix":null,"handlingStrategy":"type-guard","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"}