{"record":{"id":"3a874fe8395c5fbf","repo":"apache/seatunnel","slug":"common-32-3a874f","errorCode":"COMMON-32","errorMessage":"The date format '<date>' of field '<field>' is not supported. Please check the date format.","messagePattern":"The date format '<date>' of field '<field>' is not supported\\. Please check the date format\\.","errorType":"error_code","errorClass":"SeaTunnelRuntimeException","httpStatus":null,"severity":"error","filePath":"seatunnel-formats/seatunnel-format-json/src/main/java/org/apache/seatunnel/format/json/JsonToRowConverters.java","lineNumber":285,"sourceCode":"\n    private LocalDate convertToLocalDate(JsonNode jsonNode, String fieldName) {\n        String dateStr = jsonNode.asText();\n\n        DateTimeFormatter dateFormatter = null;\n\n        if (fieldName != null) {\n            dateFormatter = fieldFormatterMap.get(fieldName);\n        }\n\n        if (dateFormatter == null) {\n            dateFormatter = DateUtils.matchDateFormatter(dateStr);\n            if (fieldName != null) {\n                fieldFormatterMap.put(fieldName, dateFormatter);\n            }\n        }\n\n        if (dateFormatter == null) {\n            throw CommonError.formatDateError(dateStr, fieldName);\n        }\n\n        return dateFormatter.parse(dateStr).query(TemporalQueries.localDate());\n    }\n\n    private LocalTime convertToLocalTime(JsonNode jsonNode) {\n        TemporalAccessor parsedTime = TIME_FORMAT.parse(jsonNode.asText());\n        return parsedTime.query(TemporalQueries.localTime());\n    }\n\n    private LocalDateTime convertToLocalDateTime(JsonNode jsonNode, String fieldName) {\n        String datetimeStr = jsonNode.asText();\n\n        DateTimeFormatter dateTimeFormatter = null;\n\n        if (fieldName != null) {\n            dateTimeFormatter = fieldFormatterMap.get(fieldName);\n        }","sourceCodeStart":267,"sourceCodeEnd":303,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-formats/seatunnel-format-json/src/main/java/org/apache/seatunnel/format/json/JsonToRowConverters.java#L267-L303","documentation":"A JSON string value for a DATE field could not be matched to any known date pattern, so JsonToRowConverters.convertToLocalDate throws COMMON-32. The converter tries the field's cached formatter, then attempts to auto-match a formatter via DateTimeUtils.matchDateTimeFormatter; if none matches, format_date_error is raised naming the value and field.","triggerScenarios":"Parsing a JSON field declared as SeaTunnel DATE whose string (e.g. \"2024/01/05\", \"05-01-2024\", \"Jan 5, 2024\") matches no supported formatter and no user-configured date formatter applies.","commonSituations":"Upstream sends dates in a non-ISO format (slash-separated, locale month names, two-digit years); schema evolved to add DATE fields with unexpected formats; user assumed a custom pattern would be honored without configuring it.","solutions":["Fix the source to emit ISO-8601 dates (yyyy-MM-dd)","Apply a string transform to normalize the date text to a supported pattern before JSON parsing","Check the format's date formatter configuration option and set the matching pattern","Inspect the error's date and field values to confirm which field and format is failing"],"exampleFix":"// before\n{\"birthday\": \"05/01/1990\"} // unmatched pattern\n// after\n{\"birthday\": \"1990-01-05\"} // ISO yyyy-MM-dd","handlingStrategy":"validation","validationCode":"// validate the DATE string parses as ISO before ingestion\njava.time.LocalDate.parse(dateStr); // throws DateTimeParseException if not yyyy-MM-dd","typeGuard":"static boolean isIsoDate(String s) {\n    try { java.time.LocalDate.parse(s); return true; } catch (Exception e) { return false; }\n}","tryCatchPattern":"try {\n    row = jsonDeserializer.deserialize(bytes);\n} catch (SeaTunnelRuntimeException e) {\n    if (String.valueOf(e.getMessage()).contains(\"date format\")) {\n        log.warn(\"Bad DATE value dropped: {}\", e.getMessage());\n        return null;\n    }\n    throw e;\n}","preventionTips":["Standardize producers on ISO-8601 yyyy-MM-dd","Normalize date strings with a transform before JSON parsing","Configure the format's date formatter option for known non-ISO producers","Add sample-payload tests covering every DATE field"],"tags":["json","date","format"],"backgroundTag":"invalid-date-format","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"}