apache/seatunnel · error · OptionValidationException

oracle_insert_mode=APPEND_VALUES requires auto_commit=true.

Error message

oracle_insert_mode=APPEND_VALUES requires auto_commit=true.

What it means

The validator requires auto_commit=true when oracle_insert_mode=APPEND_VALUES; otherwise it throws OptionValidationException 'oracle_insert_mode=APPEND_VALUES requires auto_commit=true.' APPEND_VALUES relies on implicit commit semantics and cannot operate with auto-commit disabled.

Solutions

  1. Set auto_commit=true in the Oracle sink config
  2. Or abandon APPEND_VALUES and pick an insert mode compatible with auto_commit=false

Example fix

// before
oracle_insert_mode = "append_values"
auto_commit = false
// after
oracle_insert_mode = "append_values"
auto_commit = true
Defensive patterns

Strategy: validation

Validate before calling

if ("append_values".equalsIgnoreCase(config.get("oracle_insert_mode"))
    && !Boolean.parseBoolean(String.valueOf(config.getOrDefault("auto_commit", "false")))) {
  throw new IllegalArgumentException("auto_commit=true is required for append_values");
}

Try / catch

try {
  validateSinkOptions(config);
} catch (OptionValidationException e) {
  // set auto_commit=true or use a different insert mode
}

Prevention

When it happens

Trigger: Sink configured with oracle_insert_mode="append_values" and auto_commit=false (or unset default false in some setups); evaluate() throws at JdbcSinkFactory.java:428.

Common situations: Users disabling auto-commit believing it improves consistency; configs copied from exactly-once jobs where auto_commit=false is standard.

Understand the failure class

Background: Conflicting config options: "cannot be used together" — configuration validation errors across open-source libraries — this error's family across 162 libraries.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/944eb0a2b95e2531. Report an issue: GitHub.

Appendix: source

Thrown at seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/sink/JdbcSinkFactory.java:428

        public boolean evaluate(ReadonlyConfig config, JdbcSinkConfig.OracleInsertMode value)
                throws OptionValidationException {
            if (value != JdbcSinkConfig.OracleInsertMode.APPEND_VALUES) {
                return true;
            }
            if (config.get(JdbcSinkOptions.USE_COPY_STATEMENT)) {
                throw new OptionValidationException(
                        "oracle_insert_mode=APPEND_VALUES does not support copy statement.");
            }
            if (config.get(JdbcSinkOptions.IS_EXACTLY_ONCE)) {
                throw new OptionValidationException(
                        "oracle_insert_mode=APPEND_VALUES does not support exactly-once.");
            }
            if (!config.get(JdbcSinkOptions.AUTO_COMMIT)) {
                throw new OptionValidationException(
                        "oracle_insert_mode=APPEND_VALUES requires auto_commit=true.");
            }
            if (!config.get(JdbcSinkOptions.GENERATE_SINK_SQL)) {
                throw new OptionValidationException(
                        "oracle_insert_mode=APPEND_VALUES does not support custom query.");
            }
            if (config.get(JdbcSinkOptions.SUPPORT_UPSERT_BY_INSERT_ONLY)) {
                throw new OptionValidationException(
                        "oracle_insert_mode=APPEND_VALUES does not support insert-only upsert.");
            }
            return true;
        }
    }

    /**
     * Submission-time validator for {@code is_exactly_once=true}.
     *
     * <p>JDBC XA sink does not support retries; {@code max_retries} must be 0 when exactly-once is
     * enabled, otherwise duplicates may occur.
     */
    static class ExactlyOnceMaxRetriesValidator implements ConditionExtension<Boolean> {
        @Override

View on GitHub (pinned to cf67b549a7)