{"record":{"id":"458ecb8310d5b136","repo":"apache/seatunnel","slug":"tables-configs-d-start-mode-timestamp-must-be","errorCode":null,"errorMessage":"tables_configs[%d]: 'start_mode.timestamp' must be >= 0, got: %d","messagePattern":"tables_configs\\[(.+?)\\]: 'start_mode\\.timestamp' must be >= 0, got: (.+?)","errorType":"validation","errorClass":"OptionValidationException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-kafka/src/main/java/org/apache/seatunnel/connectors/seatunnel/kafka/source/KafkaSourceFactory.java","lineNumber":210,"sourceCode":"        public String description() {\n            return \"each tables_configs entry: start_mode.timestamp >= 0 when TIMESTAMP, \"\n                    + \"non-empty start_mode.offsets when SPECIFIC_OFFSETS\";\n        }\n\n        @Override\n        public boolean evaluate(ReadonlyConfig config, List<Map<String, Object>> entries)\n                throws OptionValidationException {\n            if (entries == null || entries.isEmpty()) {\n                return true;\n            }\n            for (int i = 0; i < entries.size(); i++) {\n                ReadonlyConfig entryConfig = ReadonlyConfig.fromMap(entries.get(i));\n                StartMode startMode =\n                        entryConfig.getOptional(KafkaSourceOptions.START_MODE).orElse(null);\n                if (startMode == StartMode.TIMESTAMP) {\n                    Long ts = entryConfig.get(KafkaSourceOptions.START_MODE_TIMESTAMP);\n                    if (ts == null || ts < 0) {\n                        throw new OptionValidationException(\n                                \"tables_configs[%d]: 'start_mode.timestamp' must be >= 0, got: %d\",\n                                i, ts);\n                    }\n                    if (entries.get(i).containsKey(KafkaSourceOptions.START_MODE_OFFSETS.key())) {\n                        throw new OptionValidationException(\n                                \"tables_configs[%d]: 'start_mode.offsets' is only valid \"\n                                        + \"when start_mode=SPECIFIC_OFFSETS\",\n                                i);\n                    }\n                    Long endTs = entryConfig.get(KafkaSourceOptions.START_MODE_END_TIMESTAMP);\n                    if (endTs != null && endTs < 0) {\n                        throw new OptionValidationException(\n                                \"tables_configs[%d]: 'start_mode.end_timestamp' must be >= 0, got: %d\",\n                                i, endTs);\n                    }\n                } else if (startMode == StartMode.SPECIFIC_OFFSETS) {\n                    Map<String, Long> offsets =\n                            entryConfig.get(KafkaSourceOptions.START_MODE_OFFSETS);","sourceCodeStart":192,"sourceCodeEnd":228,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-kafka/src/main/java/org/apache/seatunnel/connectors/seatunnel/kafka/source/KafkaSourceFactory.java#L192-L228","documentation":"KafkaSourceFactory.evaluate statically validates each entry of tables_configs. If an entry declares start_mode=TIMESTAMP, its start_mode.timestamp must be a non-negative epoch-millis value; null or negative values throw OptionValidationException with this message.","triggerScenarios":"A tables_configs entry with start_mode=TIMESTAMP where start_mode.timestamp is absent (null) or set to a negative number; validation runs during factory evaluate() at job build time.","commonSituations":"Placeholder negative values left in multi-table configs; forgetting to set timestamp after switching start_mode to TIMESTAMP; expression placeholders that resolve to null.","solutions":["Set start_mode.timestamp to a valid non-negative epoch-millis value in each TIMESTAMP-mode entry.","Remove start_mode.timestamp if you don't intend TIMESTAMP mode.","Check every tables_configs entry individually — the error names the offending index."],"exampleFix":"// before\nstart_mode = TIMESTAMP\nstart_mode.timestamp = -1\n// after\nstart_mode = TIMESTAMP\nstart_mode.timestamp = 1704067200000","handlingStrategy":"validation","validationCode":"Long ts = entry.get(\"start_mode.timestamp\");\nif (\"TIMESTAMP\".equals(entry.get(\"start_mode\")) && (ts == null || ts < 0)) throw new IllegalArgumentException(\"invalid start_mode.timestamp in tables_configs\");","typeGuard":null,"tryCatchPattern":"try { factory.evaluate(ctx); } catch (OptionValidationException e) { log.error(\"Fix table entry per message: {}\", e.getMessage()); }","preventionTips":["Validate tables_configs entries before job submission.","Avoid negative placeholder timestamps in templates."],"tags":["kafka","config","validation","tables-configs"],"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-14T11:17:12.474Z"}