apache/seatunnel · error · ConfigCheckException

plugin_input must not be empty when configured

Error message

plugin_input must not be empty when configured

What it means

ConfigCheckException thrown by resolveInputTable in ConfigValidationUtils when the 'plugin_input' option is present in the job config but its value is an empty list. The library treats a configured-but-empty plugin_input as a config error rather than silently treating the sink/input as unfiltered, because an empty list is never a valid table identifier set.

Source

Thrown at seatunnel-core/seatunnel-core-starter/src/main/java/org/apache/seatunnel/core/starter/utils/ConfigValidationUtils.java:404

                        sinks, ReadonlyConfig.fromConfig(sinkConfig), sinkClassLoader);
            }
        }
    }

    static ClassLoader getFactoryClassLoader(Factory factory, ClassLoader fallbackClassLoader) {
        return factory == null ? fallbackClassLoader : factory.getClass().getClassLoader();
    }

    private static Optional<TableInfo> resolveInputTable(
            Config pluginConfig, List<TableInfo> upstreamTables, String multiInputMessage) {
        ReadonlyConfig readonlyConfig = ReadonlyConfig.fromConfig(pluginConfig);
        if (!readonlyConfig.getOptional(PLUGIN_INPUT).isPresent()) {
            return Optional.empty();
        }

        List<String> pluginInputIdentifiers = readonlyConfig.get(PLUGIN_INPUT);
        if (pluginInputIdentifiers.isEmpty()) {
            throw new ConfigCheckException("plugin_input must not be empty when configured");
        }
        if (pluginInputIdentifiers.size() > 1) {
            throw new ConfigCheckException(multiInputMessage);
        }

        String pluginInputIdentifier = pluginInputIdentifiers.get(0);
        return Optional.of(
                upstreamTables.stream()
                        .filter(info -> pluginInputIdentifier.equals(info.getTableName()))
                        .findFirst()
                        .orElseThrow(
                                () ->
                                        new ConfigCheckException(
                                                String.format(
                                                        "table %s not found",
                                                        pluginInputIdentifier))));
    }

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Remove the `plugin_input` key entirely if you do not want to filter tables
  2. Populate `plugin_input` with at least one table identifier, e.g. `plugin_input = ["my_db.my_table"]`
  3. Fix upstream config templating so the key is omitted when the value list is empty

Example fix

# before
plugin_input = []
# after
plugin_input = ["my_db.my_table"]
Defensive patterns

Strategy: validation

Validate before calling

List<String> inputs = config.getOptional(PLUGIN_INPUT).orElse(Collections.emptyList());
if (!inputs.isEmpty() && inputs.size() != 1) {
    throw new IllegalArgumentException("plugin_input must contain exactly one identifier");
}

Try / catch

try {
    resolveInputTable(config);
} catch (ConfigCheckException e) {
    log.error("plugin_input misconfigured: {}", e.getMessage());
    throw e;
}

Prevention

When it happens

Trigger: A job config contains `plugin_input = []` (empty array) for a source/sink supporting input-table resolution; resolveInputTable (via inputTable) reads PLUGIN_INPUT and finds it present but empty, throwing before any table resolution happens.

Common situations: Hand-edited HOCON/JSON configs where the table list was cleared but the key left behind; templated configs where a variable expanding to an empty list was substituted; tools generating configs that always emit the key.

Understand the failure class

Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.

Related errors


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