{"record":{"id":"06a43f9d35ac38c4","repo":"apache/seatunnel","slug":"input-multiline-max-lines-must-be-1-when-set-i","errorCode":null,"errorMessage":"input.multiline.max-lines must be >= 1 when set (input id=${id}).","messagePattern":"input\\.multiline\\.max-lines must be >= 1 when set \\(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":81,"sourceCode":"        }\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 =\n                config.get(FileCollectOptions.MULTILINE_FLUSH_IDLE_TIMEOUT_MS);\n        if (this.multilineFlushIdleTimeoutMs < 0L) {\n            throw new IllegalArgumentException(\n                    \"input.multiline.flush-idle-timeout-ms must not be negative (input id=\"\n                            + this.id\n                            + \").\");\n        }\n        if (isMultilineEnabled() && this.multilineFlushIdleTimeoutMs <= 0L) {\n            throw new IllegalArgumentException(\n                    \"input.multiline.flush-idle-timeout-ms must be > 0 when multiline is enabled,\"\n                            + \" otherwise the buffer may never flush (input id=\"\n                            + this.id\n                            + \").\");\n        }\n        this.outputType = config.get(FileCollectOptions.OUTPUT_FORMAT_TYPE);","sourceCodeStart":63,"sourceCodeEnd":99,"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#L63-L99","documentation":"FileCollectConfig validates the optional input.multiline.max-lines option after reading it from the job config. If the configured value is less than 1, the constructor throws this IllegalArgumentException at input-registration time so a malformed multiline aggregation bound is rejected before any file is read.","triggerScenarios":"Setting input.multiline.max-lines to 0, a negative number, or a value that resolves to <1 in the agent's file-collect input config.","commonSituations":"Copy-pasting a multiline config template with a placeholder 0, auto-generated configs defaulting to 0, or unit tests constructing configs with unset numeric placeholders.","solutions":["Set input.multiline.max-lines to a positive integer (e.g. 100) in the input config","Remove the input.multiline.max-lines option entirely if multiline aggregation limits are not needed","Check for variable interpolation failures producing 0 in templated configs"],"exampleFix":"# before\ninput {\n  multiline.max-lines = 0\n}\n# after\ninput {\n  multiline.max-lines = 100\n}","handlingStrategy":"validation","validationCode":"if (cfg.contains(FileCollectOptions.MULTILINE_MAX_LINES) && cfg.get(FileCollectOptions.MULTILINE_MAX_LINES) < 1) { throw new IllegalArgumentException(\"input.multiline.max-lines must be >= 1\"); }","typeGuard":null,"tryCatchPattern":"try { new FileCollectConfig(config); } catch (IllegalArgumentException e) { log.error(\"Invalid input config: {}\", e.getMessage()); throw e; }","preventionTips":["Only set multiline.max-lines with positive integers","Omit the option when not using multiline aggregation","Add config linting in CI that asserts numeric option bounds"],"tags":["config","validation","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"}