apache/seatunnel · error · org.apache.seatunnel.api.configuration.util.OptionValidationException

Conditional ' ' not found in options.

Error message

Conditional '%s' not found in options.

What it means

Fired by verifyConditionalExists while a conditional rule is being assembled: an Option used as the condition (or inside a ConditionalRequiredOptions expression) was never declared in optionalOptions or requiredOptions of the same OptionRule. The conditional references an option key the rule does not own, so the condition could never be evaluated against user config.

Solutions

  1. Add the missing option to the rule via optional(...) or required(...) so the condition is satisfiable
  2. Remove the stale conditional entry if the option no longer exists in the factory's config surface
  3. Re-check copy-pasted conditional rules that reference options from a different connector factory
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at seatunnel-api/src/main/java/org/apache/seatunnel/api/configuration/util/OptionRule.java:585 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/a2e096a9169db73b. Report an issue: GitHub.

Appendix: source

Thrown at seatunnel-api/src/main/java/org/apache/seatunnel/api/configuration/util/OptionRule.java:585

                                            currentOptionType,
                                            option.key(),
                                            requiredOption.getClass().getSimpleName()));
                        }
                    });
        }

        private void verifyConditionalExists(@NonNull Option<?> option) {
            boolean inOptions = optionalOptions.contains(option);
            AtomicBoolean inRequired = new AtomicBoolean(false);
            requiredOptions.forEach(
                    requiredOption -> {
                        if (requiredOption.getOptions().contains(option)) {
                            inRequired.set(true);
                        }
                    });

            if (!inOptions && !inRequired.get()) {
                throw new OptionValidationException(
                        String.format("Conditional '%s' not found in options.", option.key()));
            }
        }
    }

    @Getter
    @AllArgsConstructor
    private enum CurrentOptionType {
        OPTIONS_OPTION("OptionsOption"),
        OPTIONS_OPTION_WITH_CONSTRAINT("OptionsOptionWithConstraint");

        private final String type;
    }
}

View on GitHub (pinned to cf67b549a7)