apache/seatunnel · error · SeaTunnelJsonFormatException
UNSUPPORTED_DATA_TYPE
UNSUPPORTED_DATA_TYPE
Error message
Unknown "type" value "%s". The MaxWell JSON message is '%s'
What it means
MaxWellJsonDeserializationSchema dispatches on the 'type' field of a Maxwell CDC JSON message (insert/update/delete are recognized). Any other value — with ignoreParseErrors=false — raises SeaTunnelJsonFormatException(UNSUPPORTED_DATA_TYPE) embedding both the unknown type and the full raw message, because SeaTunnel cannot map such events to a RowKind.
Source
Thrown at seatunnel-formats/seatunnel-format-json/src/main/java/org/apache/seatunnel/format/json/maxwell/MaxWellJsonDeserializationSchema.java:182
if (tsNode != null) {
MetadataUtil.setEventTime(rowBefore, tsNode.asLong() * 1000);
MetadataUtil.setEventTime(rowAfter, tsNode.asLong() * 1000);
}
out.collect(rowBefore);
out.collect(rowAfter);
} else if (OP_DELETE.equals(type)) {
SeaTunnelRow rowDelete = convertJsonNode(dataNode);
rowDelete.setRowKind(RowKind.DELETE);
if (tablePath != null && !tablePath.toString().isEmpty()) {
rowDelete.setTableId(tablePath.toString());
}
if (tsNode != null) {
MetadataUtil.setEventTime(rowDelete, tsNode.asLong() * 1000);
}
out.collect(rowDelete);
} else {
if (!ignoreParseErrors) {
throw new SeaTunnelJsonFormatException(
CommonErrorCode.UNSUPPORTED_DATA_TYPE,
format(
"Unknown \"type\" value \"%s\". The MaxWell JSON message is '%s'",
type, new String(message)));
}
}
}
private JsonNode convertBytes(byte[] message) {
try {
return jsonDeserializer.deserializeToJsonNode(message);
} catch (Exception t) {
if (ignoreParseErrors) {
return null;
}
throw new SeaTunnelJsonFormatException(
CommonErrorCode.CONVERT_TO_CONNECTOR_TYPE_ERROR_SIMPLE,
String.format("Failed to deserialize JSON '%s'.", new String(message)),View on GitHub (pinned to cf67b549a7)
Solutions
- Set ignore_parse_errors=true (format config option) to skip unsupported messages instead of failing the job
- Filter the Kafka topic before SeaTunnel (or use topic routing) to drop bootstrap/ddl events
- Configure Maxwell to only output row events (bootstrap off, output_ddl=false)
- Check the actual message content in the error text to identify and handle the new type explicitly
Example fix
// before format = json // after: skip unparseable/unexpected maxwell messages format = json format.ignore-parse-errors = true
Defensive patterns
Strategy: validation
Validate before calling
JsonNode typeNode = root.get("type");
String type = typeNode != null ? typeNode.asText() : null;
if (!"insert".equals(type) && !"update".equals(type) && !"delete".equals(type)) {
// skip bootstrap/ddl events before handing to the schema
return;
} Try / catch
try {
schema.deserialize(message, out);
} catch (SeaTunnelJsonFormatException e) {
log.warn("Skipping maxwell message with unknown type: {}", e.getMessage());
} Prevention
- Set format.ignore-parse-errors=true for topics containing bootstrap/ddl events
- Disable Maxwell bootstrap and DDL output if only row events are needed
- Route row events to a dedicated topic via Maxwell filtering
When it happens
Trigger: deserialize() receives a Maxwell message whose "type" is not one of insert/delete (e.g. "bootstrap-insert", "sql_update", or a corrupt/empty value) and ignoreParseErrors is false; the else-branch throws.
Common situations: Maxwell bootstrapping phase emits bootstrap-insert/bootstrap-complete events; Maxwell config with output_ddl or schema-change events; garbage/corrupted messages in the Kafka topic; mixing Maxwell versions with different type vocabularies.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- CONVERT_TO_CONNECTOR_TYPE_ERROR_SIMPLE
- Unknown operation type '%s'.
- COMMON-02
- COMMON-02
- Unknown table change type:
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/7d15745aa7a91720.
Report an issue: GitHub.