apache/seatunnel · error · OptionValidationException
%s[%d]: '%s' must be configured and non-blank
Error message
%s[%d]: '%s' must be configured and non-blank
What it means
RabbitmqTableConfigsValidator.evaluate throws OptionValidationException when an entry inside tables-configs lacks a queue-name or it is blank. Each table entry must identify which RabbitMQ queue it consumes, identified by index in the message (tables-configs[i]).
Source
Thrown at seatunnel-connectors-v2/connector-rabbitmq/src/main/java/org/apache/seatunnel/connectors/seatunnel/rabbitmq/config/RabbitmqTableConfigsValidator.java:63
+ "' and a '"
+ SCHEMA_KEY
+ "', and forbids a root-level '"
+ SCHEMA_KEY
+ "'";
}
@Override
public boolean evaluate(ReadonlyConfig config, List<Map<String, Object>> entries)
throws OptionValidationException {
if (config.getOptional(RabbitmqBaseOptions.SCHEMA).isPresent()) {
throw new OptionValidationException(
"Cannot specify both '%s' and root-level '%s'.", TABLE_CONFIGS_KEY, SCHEMA_KEY);
}
for (int i = 0; i < entries.size(); i++) {
ReadonlyConfig entry = ReadonlyConfig.fromMap(entries.get(i));
String queueName = entry.getOptional(RabbitmqBaseOptions.QUEUE_NAME).orElse(null);
if (queueName == null || queueName.trim().isEmpty()) {
throw new OptionValidationException(
"%s[%d]: '%s' must be configured and non-blank",
TABLE_CONFIGS_KEY, i, QUEUE_NAME_KEY);
}
if (!entry.getOptional(RabbitmqBaseOptions.SCHEMA).isPresent()) {
throw new OptionValidationException(
"%s[%d]: '%s' must be configured", TABLE_CONFIGS_KEY, i, SCHEMA_KEY);
}
}
return true;
}
}
View on GitHub (pinned to cf67b549a7)
Solutions
- Add a non-blank queue-name to every entry in tables-configs
- Trim/validate your config generation templates to not emit empty values
- Ensure you use the exact option key queue-name as defined in RabbitmqBaseOptions
Example fix
// before
tables-configs = [
{ schema = { fields { id = int } } }
]
// after
tables-configs = [
{ queue-name = "orders", schema = { fields { id = int } } }
] Defensive patterns
Strategy: validation
Validate before calling
for (int i = 0; i < entries.size(); i++) {
Object qn = entries.get(i).get("queue-name");
if (qn == null || qn.toString().trim().isEmpty()) {
throw new IllegalArgumentException("tables-configs[" + i + "] missing non-blank queue-name");
}
} Try / catch
try {
tablesConfigsValidator.evaluate(config, entries);
} catch (OptionValidationException e) {
System.err.println("Entry error: " + e.getMessage()); // includes tables-configs[i] index
} Prevention
- Verify exact option key spelling (queue-name, hyphenated)
- Template-generate configs and assert no blank placeholders remain
- Check each entry independently with the validator before job submission
When it happens
Trigger: tables-configs[i] map has no queue-name key, or the value is null/whitespace-only after trim.
Common situations: Typo in key name (queue_name vs queue-name); empty string left from templating; entry copied from an example with a placeholder left blank.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- '%s' must be configured when '%s' is used
- Cannot specify both '%s' and root-level '%s'.
- %s[%d]: '%s' must be configured
- transport.endpoint is required.
- Schema config can not be empty
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/8bdda28fd10dc683.
Report an issue: GitHub.