{"record":{"id":"91c3d459dc8f970b","repo":"quarkusio/quarkus","slug":"errormessage-formatted-clientname-required-liq","errorCode":null,"errorMessage":"<errorMessage>.formatted(clientName) (required Liquibase MongoDB config missing for client)","messagePattern":"<errorMessage>\\.formatted\\(clientName\\) \\(required Liquibase MongoDB config missing for client\\)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"critical","filePath":"extensions/liquibase/liquibase-mongodb/runtime/src/main/java/io/quarkus/liquibase/mongodb/runtime/LiquibaseMongodbRecorder.java","lineNumber":40,"sourceCode":"    private final LiquibaseMongodbBuildTimeConfig buildTimeConfig;\n    private final RuntimeValue<LiquibaseMongodbConfig> runtimeConfig;\n    private final RuntimeValue<MongoConfig> mongodbRuntimeConfig;\n\n    public LiquibaseMongodbRecorder(\n            final LiquibaseMongodbBuildTimeConfig buildTimeConfig,\n            final RuntimeValue<LiquibaseMongodbConfig> runtimeConfig,\n            final RuntimeValue<MongoConfig> mongodbRuntimeConfig) {\n        this.buildTimeConfig = buildTimeConfig;\n        this.runtimeConfig = runtimeConfig;\n        this.mongodbRuntimeConfig = mongodbRuntimeConfig;\n    }\n\n    public Supplier<LiquibaseMongodbFactory> liquibaseSupplier(String clientName) {\n        return new Supplier<LiquibaseMongodbFactory>() {\n            private <T> T getRequiredConfig(Map<String, T> map, String errorMessage) {\n                T value = map.get(clientName);\n                if (value == null) {\n                    throw new IllegalArgumentException(errorMessage.formatted(clientName));\n                }\n                return value;\n            }\n\n            @Override\n            public LiquibaseMongodbFactory get() {\n                LiquibaseMongodbBuildTimeClientConfig buildTimeClientConfig = getRequiredConfig(\n                        buildTimeConfig.clientConfigs(),\n                        \"Liquibase Mongo config (changeLog) named '%s' not found\");\n\n                LiquibaseMongodbClientConfig liquibaseMongodbClientConfig = getRequiredConfig(\n                        runtimeConfig.getValue().clientConfigs(),\n                        \"Liquibase Mongo client config named '%s' not found\");\n\n                MongoClientConfig mongoClientConfig;\n                String clientNameSelected;\n                if (liquibaseMongodbClientConfig.mongoClientName().isPresent()) {\n                    // keep compatibility with the legacy configuration which makes possible set the mongo-client-name","sourceCodeStart":22,"sourceCodeEnd":58,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/liquibase/liquibase-mongodb/runtime/src/main/java/io/quarkus/liquibase/mongodb/runtime/LiquibaseMongodbRecorder.java#L22-L58","documentation":"LiquibaseMongodbRecorder.getRequiredConfig looks up a per-client map entry keyed by clientName during recorded startup actions; if the entry is missing it throws IllegalArgumentException with the supplied formatted message (required Liquibase MongoDB config missing for client <name>). It is called from buildTimeClientConfig, liquibaseMongodbClientConfig, and the supplier's get(), meaning both build-time and runtime lookups enforce presence. The error guards against silent nulls when a named client has no Liquibase configuration.","triggerScenarios":"A Liquibase supplier is recorded for clientName 'X' but the runtime config maps (clients configs for quarkus.liquibase-mongodb.<client>.* or quarkus.mongodb.<client>.*) contain no entry for 'X' — e.g. referencing a client name in quarkus.liquibase-mongodb.<name>.change-log that was never defined, or removing a client from config while start actions still reference it.","commonSituations":"Renaming a MongoDB client in config but leaving the old name in liquibase-mongodb properties; multiple named clients where one block was deleted; typos in the client name key; using only default (quarkus.liquibase-mongodb.*) config while code expects a named client entry.","solutions":["Define the missing config block for the named client, e.g. quarkus.liquibase-mongodb.<client-name>.change-log=... and its quarkus.mongodb.<client-name>.* settings","Make sure client names in quarkus.liquibase-mongodb.<client-name>.* exactly match those in quarkus.mongodb.<client-name>.* (check spelling)","If the client is unused, remove the stale reference / disable its start actions instead of leaving a half-configured client","After Quarkus config changes, rebuild — build-time config keys are fixed at augmentation time"],"exampleFix":"# before (client 'audit' referenced but undefined)\n# after\nquarkus.mongodb.audit.connection-string=mongodb://localhost:27017/auditdb\nquarkus.liquibase-mongodb.audit.change-log=db/changelog/audit-changelog.yaml","handlingStrategy":"validation","validationCode":"// Before startup, ensure every referenced client has both mongodb and liquibase-mongodb config\njava.util.Set<String> liquibaseClients = allKeysMatching(\"quarkus.liquibase-mongodb.\\\\w+.change-log\");\njava.util.Set<String> mongoClients = allKeysMatching(\"quarkus.mongodb.\\\\w+.connection-string\");\nfor (String c : liquibaseClients) {\n    if (!mongoClients.contains(c)) {\n        throw new IllegalStateException(\"Client '\" + c + \"' referenced by liquibase-mongodb has no quarkus.mongodb.\" + c + \" config\");\n    }\n}","typeGuard":null,"tryCatchPattern":"try {\n    startApplication();\n} catch (IllegalArgumentException e) {\n    if (e.getMessage() != null && e.getMessage().contains(\"required Liquibase MongoDB config missing\")) {\n        // extract client name from message, add quarkus.liquibase-mongodb.<name>.* and quarkus.mongodb.<name>.* blocks\n    }\n    throw e;\n}","preventionTips":["Keep client names identical across quarkus.mongodb.<name>.* and quarkus.liquibase-mongodb.<name>.* blocks","When renaming/removing clients, update all Liquibase config keys in the same change","Store multi-client config in one profile section so deletions are visible","Rebuild after build-time config edits; run one startup smoke test per named client"],"tags":["mongodb","liquibase","configuration","named-client","recorder","startup"],"backgroundTag":"missing-required-config-property","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}