apache/seatunnel · error · IllegalArgumentException

input.paths must not contain blank entries

Error message

input.paths must not contain blank entries (input id=${id}).

What it means

Each individual entry inside `input.paths` must be a non-blank string. FileCollectConfig iterates the path list and throws this IllegalArgumentException if any element is null or whitespace-only, again naming the input id. This catches silently-broken globs that would otherwise collect nothing.

Solutions

  1. Remove blank/null entries from the input's paths list
  2. Check template variables used in paths — unset ones likely render as empty strings
  3. Validate each glob resolves to a sensible non-empty pattern before applying config
  4. Fail fast in config tooling by trimming and filtering empty path entries at generation time

Example fix

// before
input {
  id = "app-logs"
  paths = ["/var/log/app/*.log", ""]
}
// after
input {
  id = "app-logs"
  paths = ["/var/log/app/*.log"]
}
Defensive patterns

Strategy: validation

Validate before calling

List<String> paths = config.get(FileCollectOptions.PATHS);
for (String p : paths) {
    if (p == null || p.trim().isEmpty()) {
        throw new IllegalArgumentException("paths contains a blank entry");
    }
}

Type guard

boolean allPathsValid(List<String> paths) {
    return paths.stream().allMatch(p -> p != null && !p.trim().isEmpty());
}

Try / catch

try {
    FileCollectConfig cfg = new FileCollectConfig(config);
} catch (IllegalArgumentException e) {
    log.error("Invalid input config: {}", e.getMessage());
}

Prevention

When it happens

Trigger: A file-collect input's paths list contains a null or blank entry (e.g. `paths = ["/var/log/*.log", ""]` or a trailing comma in list syntax) when FileCollectConfig is constructed.

Common situations: Hand-edited lists with accidental empty strings, template expansion of an unset variable yielding an empty element, YAML list items that are blank after comment removal, or programmatic list building appending nulls.

Understand the failure class

Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.

Related errors


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

Appendix: source

Thrown at seatunnel-edge-agent/seatunnel-edge-agent-connector/src/main/java/org/apache/seatunnel/edge/agent/connector/config/FileCollectConfig.java:66

    private final Charset charset;
    private final String onError;
    private final long globScanIntervalMs;
    private final long closeInactiveMs;

    public FileCollectConfig(ReadonlyConfig config) {
        Objects.requireNonNull(config, "config");
        this.id = config.get(FileCollectOptions.ID);
        if (this.id == null || this.id.trim().isEmpty()) {
            throw new IllegalArgumentException("input.id must be non-empty.");
        }
        List<String> pathList = config.get(FileCollectOptions.PATHS);
        if (pathList == null || pathList.isEmpty()) {
            throw new IllegalArgumentException(
                    "input.paths must not be empty (input id=" + this.id + ").");
        }
        for (String path : pathList) {
            if (path == null || path.trim().isEmpty()) {
                throw new IllegalArgumentException(
                        "input.paths must not contain blank entries (input id=" + this.id + ").");
            }
        }
        this.paths = Collections.unmodifiableList(new ArrayList<>(pathList));
        this.encoding = config.get(FileCollectOptions.ENCODING);
        this.charset = resolveCharset(this.encoding, this.id);
        this.readFromBeginning = config.get(FileCollectOptions.READ_FROM_BEGINNING);
        this.multilinePattern =
                config.getOptional(FileCollectOptions.MULTILINE_PATTERN).orElse(null);
        this.multilineMatch = config.get(FileCollectOptions.MULTILINE_MATCH);
        validateMultilineMatch(this.multilineMatch);
        this.multilineNegate = config.get(FileCollectOptions.MULTILINE_NEGATE);
        this.multilineMaxLines = config.get(FileCollectOptions.MULTILINE_MAX_LINES);
        if (this.multilineMaxLines < 1) {
            throw new IllegalArgumentException(
                    "input.multiline.max-lines must be >= 1 when set (input id=" + this.id + ").");
        }
        this.multilineFlushIdleTimeoutMs =

View on GitHub (pinned to cf67b549a7)