apache/seatunnel · warning

Row-level error in stage

Error message

Row-level error in stage [{}], plugin [{}] on table [{}]: {}. TotalRecords={}, ErrorRecords={}

What it means

ErrorHandler.onError logs every row-level exception it handles, with stage, plugin, table, counters, and (when config.isIncludeStacktrace() is true) the full stack trace at WARN level. This is the stacktrace-enabled branch — it does not itself fail the job; it records that a row was routed to error handling (skipped, written to error sink, etc.).

Solutions

  1. Inspect the stack trace to identify the offending row data pattern; fix upstream data quality if volume is high.
  2. Watch TotalRecords/ErrorRecords metrics; if ErrorRecords approaches maxErrorRecords threshold, the job will fail — fix data or raise thresholds deliberately.
  3. Set includeStacktrace=false in production to reduce log volume; keep it for debugging.
  4. Route rows to an error sink so they can be replayed after correction instead of only logging them.
Defensive patterns

Strategy: validation

Validate before calling

// before enabling row error handling, estimate the error ratio on a sample
long total = inputCount();
long errs = errorCount();
if (total > 0 && (double) errs / total > maxErrorRatio) {
    throw new IllegalStateException("error ratio exceeds configured threshold: " + errs + "/" + total);
}

Type guard

null

Try / catch

null

Prevention

When it happens

Trigger: A source/transform/sink throws a row-classified exception while ErrorHandler is active and includeStacktrace=true; the row is counted (ErrorRecords) and dispatched per the configured error-handling mode.

Common situations: Bad data rows failing type conversion or constraint checks; per-row write rejections (duplicate keys, row too large); debugging sessions where stacktrace logging was turned on to diagnose why rows land in the error sink.

Related errors


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

Appendix: source

Thrown at seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/task/error/ErrorHandler.java:114

                        ctx.getStage(),
                        ctx.getPluginName(),
                        ctx.getTableId(),
                        t != null ? t.getMessage() : null,
                        buildEx);
            }
        }

        // Log error when LOG/ROUTE mode is enabled.
        if (config.getMode() == ErrorHandlerMode.LOG
                || config.getMode() == ErrorHandlerMode.ROUTE) {
            try {
                String stage = ctx.getStage();
                String pluginName = ctx.getPluginName();
                String tableId = ctx.getTableId();
                String errorMessage = t != null ? t.getMessage() : null;

                if (config.isIncludeStacktrace() && t != null) {
                    log.warn(
                            "Row-level error in stage [{}], plugin [{}] on table [{}]: {}. TotalRecords={}, ErrorRecords={}",
                            stage,
                            pluginName,
                            tableId,
                            errorMessage,
                            counter.getTotalRecords(),
                            currentErrorCount,
                            t);
                } else {
                    log.warn(
                            "Row-level error in stage [{}], plugin [{}] on table [{}]: {}. TotalRecords={}, ErrorRecords={}",
                            stage,
                            pluginName,
                            tableId,
                            errorMessage,
                            counter.getTotalRecords(),
                            currentErrorCount);
                }

View on GitHub (pinned to cf67b549a7)