quarkusio/quarkus · critical · IllegalArgumentException
<errorMessage>.formatted(clientName) (required Liquibase Mon
Error message
<errorMessage>.formatted(clientName) (required Liquibase MongoDB config missing for client)
What it means
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.
Source
Thrown at extensions/liquibase/liquibase-mongodb/runtime/src/main/java/io/quarkus/liquibase/mongodb/runtime/LiquibaseMongodbRecorder.java:40
private final LiquibaseMongodbBuildTimeConfig buildTimeConfig;
private final RuntimeValue<LiquibaseMongodbConfig> runtimeConfig;
private final RuntimeValue<MongoConfig> mongodbRuntimeConfig;
public LiquibaseMongodbRecorder(
final LiquibaseMongodbBuildTimeConfig buildTimeConfig,
final RuntimeValue<LiquibaseMongodbConfig> runtimeConfig,
final RuntimeValue<MongoConfig> mongodbRuntimeConfig) {
this.buildTimeConfig = buildTimeConfig;
this.runtimeConfig = runtimeConfig;
this.mongodbRuntimeConfig = mongodbRuntimeConfig;
}
public Supplier<LiquibaseMongodbFactory> liquibaseSupplier(String clientName) {
return new Supplier<LiquibaseMongodbFactory>() {
private <T> T getRequiredConfig(Map<String, T> map, String errorMessage) {
T value = map.get(clientName);
if (value == null) {
throw new IllegalArgumentException(errorMessage.formatted(clientName));
}
return value;
}
@Override
public LiquibaseMongodbFactory get() {
LiquibaseMongodbBuildTimeClientConfig buildTimeClientConfig = getRequiredConfig(
buildTimeConfig.clientConfigs(),
"Liquibase Mongo config (changeLog) named '%s' not found");
LiquibaseMongodbClientConfig liquibaseMongodbClientConfig = getRequiredConfig(
runtimeConfig.getValue().clientConfigs(),
"Liquibase Mongo client config named '%s' not found");
MongoClientConfig mongoClientConfig;
String clientNameSelected;
if (liquibaseMongodbClientConfig.mongoClientName().isPresent()) {
// keep compatibility with the legacy configuration which makes possible set the mongo-client-nameView on GitHub (pinned to e1c734241f)
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
Example fix
# before (client 'audit' referenced but undefined) # after quarkus.mongodb.audit.connection-string=mongodb://localhost:27017/auditdb quarkus.liquibase-mongodb.audit.change-log=db/changelog/audit-changelog.yaml
Defensive patterns
Strategy: validation
Validate before calling
// Before startup, ensure every referenced client has both mongodb and liquibase-mongodb config
java.util.Set<String> liquibaseClients = allKeysMatching("quarkus.liquibase-mongodb.\\w+.change-log");
java.util.Set<String> mongoClients = allKeysMatching("quarkus.mongodb.\\w+.connection-string");
for (String c : liquibaseClients) {
if (!mongoClients.contains(c)) {
throw new IllegalStateException("Client '" + c + "' referenced by liquibase-mongodb has no quarkus.mongodb." + c + " config");
}
} Try / catch
try {
startApplication();
} catch (IllegalArgumentException e) {
if (e.getMessage() != null && e.getMessage().contains("required Liquibase MongoDB config missing")) {
// extract client name from message, add quarkus.liquibase-mongodb.<name>.* and quarkus.mongodb.<name>.* blocks
}
throw e;
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Config property 'quarkus.mongodb.database' must be defined w
- Mongo client named '%s' not found
- Error starting Liquibase
- The database attribute was not set for the @MongoEntity anno
- Unable to find top command. Ensure you have a @CommandDefini
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/91c3d459dc8f970b.
Report an issue: GitHub.