apache/seatunnel · error · java.lang.IllegalArgumentException
Unrecognized option for boolean
Error message
Unrecognized option for boolean: %s. Expected either true or false(case insensitive)
What it means
Thrown from ConfigUtil.convertToBoolean as the switch default: a Boolean-typed option received text that uppercases to neither TRUE nor FALSE. This guard fires for typos like "ture", "yes", "1", or " enabled" — boolean options accept only the exact words true/false case-insensitively; numeric truthiness is intentionally not supported.
Solutions
- Set the option to exactly true or false (case-insensitive), e.g. enable = true
- Replace informal values like yes/no or 1/0 with true/false
- Trim stray whitespace or invisible characters around the value in the config file
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at seatunnel-api/src/main/java/org/apache/seatunnel/api/configuration/util/ConfigUtil.java:279 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/d7c3bc0b1bbead37.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-api/src/main/java/org/apache/seatunnel/api/configuration/util/ConfigUtil.java:279
start = 1;
}
for (int i = start; i < value.length(); i++) {
if (!Character.isDigit(value.charAt(i))) {
return false;
}
}
return true;
}
static Boolean convertToBoolean(Object o) {
switch (o.toString().toUpperCase()) {
case "TRUE":
return true;
case "FALSE":
return false;
default:
throw new IllegalArgumentException(
String.format(
"Unrecognized option for boolean: %s. Expected either true or false(case insensitive)",
o));
}
}
static <E extends Enum<?>> E convertToEnum(Object o, Class<E> clazz) {
return Arrays.stream(clazz.getEnumConstants())
.filter(
e ->
e.toString()
.toUpperCase(Locale.ROOT)
.equals(o.toString().toUpperCase(Locale.ROOT)))
.findAny()
.orElseThrow(
() ->
new IllegalArgumentException(
String.format(View on GitHub (pinned to cf67b549a7)