{"record":{"id":"1c55cea2a36a8051","repo":"apache/seatunnel","slug":"input-paths-must-not-contain-blank-entries-input","errorCode":null,"errorMessage":"input.paths must not contain blank entries (input id=${id}).","messagePattern":"input\\.paths must not contain blank entries \\(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":66,"sourceCode":"    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);\n        if (this.multilineMaxLines < 1) {\n            throw new IllegalArgumentException(\n                    \"input.multiline.max-lines must be >= 1 when set (input id=\" + this.id + \").\");\n        }\n        this.multilineFlushIdleTimeoutMs =","sourceCodeStart":48,"sourceCodeEnd":84,"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#L48-L84","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Remove blank/null entries from the input's paths list","Check template variables used in paths — unset ones likely render as empty strings","Validate each glob resolves to a sensible non-empty pattern before applying config","Fail fast in config tooling by trimming and filtering empty path entries at generation time"],"exampleFix":"// before\ninput {\n  id = \"app-logs\"\n  paths = [\"/var/log/app/*.log\", \"\"]\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);\nfor (String p : paths) {\n    if (p == null || p.trim().isEmpty()) {\n        throw new IllegalArgumentException(\"paths contains a blank entry\");\n    }\n}","typeGuard":"boolean allPathsValid(List<String> paths) {\n    return paths.stream().allMatch(p -> p != null && !p.trim().isEmpty());\n}","tryCatchPattern":"try {\n    FileCollectConfig cfg = new FileCollectConfig(config);\n} catch (IllegalArgumentException e) {\n    log.error(\"Invalid input config: {}\", e.getMessage());\n}","preventionTips":["Trim and filter path lists at config generation time","Beware unset template variables rendering empty strings","Check YAML/HOCON list syntax for stray blank items","Add config linting that rejects blank list entries"],"tags":["config-validation","edge-agent","file-collect"],"backgroundTag":"invalid-config-value","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"}