apache/seatunnel · error · IllegalArgumentException
input.id must be non-empty.
Error message
input.id must be non-empty.
What it means
FileCollectConfig is the parsed configuration for a file-collect input in the edge agent connector. Its constructor requires `input.id` (FileCollectOptions.ID) to be present and non-blank, throwing IllegalArgumentException otherwise. The id is used to identify the input in logs, metrics, and error context, so it cannot be defaulted.
Solutions
- Add a unique non-empty `input.id` to the file-collect input config
- Ensure template/variable substitution didn't render the id as empty
- Check the config keys are nested correctly so `input.id` is actually parsed
- Validate agent config at startup and fail fast on missing ids
Example fix
// before
input {
paths = ["/var/log/app/*.log"]
}
// after
input {
id = "app-logs"
paths = ["/var/log/app/*.log"]
} Defensive patterns
Strategy: validation
Validate before calling
String id = config.get(FileCollectOptions.ID);
if (id == null || id.trim().isEmpty()) {
throw new IllegalArgumentException("input.id must be set before building FileCollectConfig");
} Type guard
boolean hasValidId(ReadonlyConfig c) {
String id = c.get(FileCollectOptions.ID);
return id != null && !id.trim().isEmpty();
} Try / catch
try {
FileCollectConfig cfg = new FileCollectConfig(config);
} catch (IllegalArgumentException e) {
log.error("Invalid input config: {}", e.getMessage());
} Prevention
- Require input.id in agent config schema validation
- Fail fast at config load time
- Use deterministic ids per input in templates
- Add unit tests for config parsing with missing fields
When it happens
Trigger: Constructing FileCollectConfig from a ReadonlyConfig that lacks the `input.id` option, or has it set to an empty/whitespace-only string; typically when building the agent's connector input configs from user-supplied agent configuration.
Common situations: An input entry in the edge agent config missing the id field, generated configs where id was omitted, or ids defined as empty strings by template rendering with unset variables.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- input.paths must not be empty
- input.paths must not contain blank entries
- All candidate sink tables were skipped during job parsing.
- AmazonDocumentDB option 'uri' must include authentication…
- batch_size must be >= 1, got:
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/0a4da15b68d8b0d6.
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:57
private final List<String> paths;
private final String encoding;
private final boolean readFromBeginning;
private final String multilinePattern;
private final String multilineMatch;
private final boolean multilineNegate;
private final int multilineMaxLines;
private final long multilineFlushIdleTimeoutMs;
private final String outputType;
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);View on GitHub (pinned to cf67b549a7)