{"record":{"id":"2722368171686e4c","repo":"apache/seatunnel","slug":"input-paths-must-not-be-empty-input-id-id","errorCode":null,"errorMessage":"input.paths must not be empty (input id=${id}).","messagePattern":"input\\.paths must not be empty \\(input id=(.+?)\\)\\.","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-edge-agent/seatunnel-edge-agent-connector/src/main/java/org/apache/seatunnel/edge/agent/connector/config/FileCollectConfig.java","lineNumber":61,"sourceCode":"    private final String multilineMatch;\n    private final boolean multilineNegate;\n    private final int multilineMaxLines;\n    private final long multilineFlushIdleTimeoutMs;\n    private final String outputType;\n    private final Charset charset;\n    private final String onError;\n    private final long globScanIntervalMs;\n    private final long closeInactiveMs;\n\n    public FileCollectConfig(ReadonlyConfig config) {\n        Objects.requireNonNull(config, \"config\");\n        this.id = config.get(FileCollectOptions.ID);\n        if (this.id == null || this.id.trim().isEmpty()) {\n            throw new IllegalArgumentException(\"input.id must be non-empty.\");\n        }\n        List<String> pathList = config.get(FileCollectOptions.PATHS);\n        if (pathList == null || pathList.isEmpty()) {\n            throw new IllegalArgumentException(\n                    \"input.paths must not be empty (input id=\" + this.id + \").\");\n        }\n        for (String path : pathList) {\n            if (path == null || path.trim().isEmpty()) {\n                throw new IllegalArgumentException(\n                        \"input.paths must not contain blank entries (input id=\" + this.id + \").\");\n            }\n        }\n        this.paths = Collections.unmodifiableList(new ArrayList<>(pathList));\n        this.encoding = config.get(FileCollectOptions.ENCODING);\n        this.charset = resolveCharset(this.encoding, this.id);\n        this.readFromBeginning = config.get(FileCollectOptions.READ_FROM_BEGINNING);\n        this.multilinePattern =\n                config.getOptional(FileCollectOptions.MULTILINE_PATTERN).orElse(null);\n        this.multilineMatch = config.get(FileCollectOptions.MULTILINE_MATCH);\n        validateMultilineMatch(this.multilineMatch);\n        this.multilineNegate = config.get(FileCollectOptions.MULTILINE_NEGATE);\n        this.multilineMaxLines = config.get(FileCollectOptions.MULTILINE_MAX_LINES);","sourceCodeStart":43,"sourceCodeEnd":79,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-edge-agent/seatunnel-edge-agent-connector/src/main/java/org/apache/seatunnel/edge/agent/connector/config/FileCollectConfig.java#L43-L79","documentation":"A file-collect input must declare at least one path to watch/collect. FileCollectConfig's constructor throws this IllegalArgumentException when `input.paths` (FileCollectOptions.PATHS) is null or an empty list, including the input's id in the message to identify the offending input block.","triggerScenarios":"Building FileCollectConfig from a ReadonlyConfig whose `input.paths` option is absent or resolves to an empty list; happens per input during agent connector configuration setup.","commonSituations":"Input block defined with only an id but no paths, YAML/HOCON list rendered empty by variable substitution, or misnaming the key (`path` instead of `paths`) so the list is not found.","solutions":["Add at least one path to `input.paths` for the input with the reported id","Use the exact key `paths` (a list), not `path`","Verify glob/variable substitution produces non-empty lists at render time","Remove unused empty input blocks entirely"],"exampleFix":"// before\ninput {\n  id = \"app-logs\"\n}\n// after\ninput {\n  id = \"app-logs\"\n  paths = [\"/var/log/app/*.log\"]\n}","handlingStrategy":"validation","validationCode":"List<String> paths = config.get(FileCollectOptions.PATHS);\nif (paths == null || paths.isEmpty()) {\n    throw new IllegalArgumentException(\"input.paths must list at least one path\");\n}","typeGuard":"boolean hasPaths(ReadonlyConfig c) {\n    List<String> p = c.get(FileCollectOptions.PATHS);\n    return p != null && !p.isEmpty();\n}","tryCatchPattern":"try {\n    FileCollectConfig cfg = new FileCollectConfig(config);\n} catch (IllegalArgumentException e) {\n    log.error(\"Invalid input config: {}\", e.getMessage());\n}","preventionTips":["Always pair input.id with non-empty input.paths","Validate rendered templates produce populated lists","Use the exact key name `paths`","Drop empty input blocks instead of shipping them"],"tags":["config-validation","edge-agent","file-collect"],"backgroundTag":"missing-required-config-field","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}