apache/seatunnel · error · IllegalArgumentException
The type <type> is not supported!
Error message
The type <type> is not supported!
What it means
SeaTunnelRowSerializer.serialize supports only the configured formats `json` and `csv`; any other `format` value in the Doris sink config throws IllegalArgumentException. This guards against typos since the format directly controls stream-load payload encoding.
Source
Thrown at seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/serialize/SeaTunnelRowSerializer.java:145
@Override
public void open() throws IOException {}
@Override
public byte[] serialize(SeaTunnelRow seaTunnelRow) throws IOException {
if (enableDelete) {
List<Object> newFields = new ArrayList<>(Arrays.asList(seaTunnelRow.getFields()));
newFields.add(parseDeleteSign(seaTunnelRow.getRowKind()));
seaTunnelRow = new SeaTunnelRow(newFields.toArray());
}
if (JSON.equals(type)) {
return buildJsonString(seaTunnelRow);
} else if (CSV.equals(type)) {
return buildCSVString(seaTunnelRow);
} else {
throw new IllegalArgumentException("The type " + type + " is not supported!");
}
}
@Override
public void close() throws IOException {}
}
View on GitHub (pinned to cf67b549a7)
Solutions
- Set the Doris sink `format` option to exactly `json` or `csv` (lowercase)
- Validate the config before running the job
- Check connector docs for supported formats
Example fix
// before
sink {
Doris {
format = "JSON"
}
}
// after
sink {
Doris {
format = "json"
}
} Defensive patterns
Strategy: validation
Validate before calling
String format = config.getString("format");
if (!"json".equals(format) && !"csv".equals(format)) throw new IllegalArgumentException("format must be json or csv"); Prevention
- Use exactly lowercase "json" or "csv" in the Doris sink format option
- Copy config samples from official docs, not other connectors
- Lint connector configs before job submission
When it happens
Trigger: Setting `format = "JSON"` (uppercase), `format = "parquet"`, or any misspelled value in the Doris sink options; programmatic construction of the serializer with an invalid type string.
Common situations: Config typo or copied config from another connector; case sensitivity confusion (config expects lowercase "json"/"csv").
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
- SHOULD_NEVER_HAPPEN
- ROUTING_FAILED
- {} is less than {}, set to default value {}.
- Schema config can not be empty
- Can not find catalog table with factoryId [%s]
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/1e7ad4c6521967f7.
Report an issue: GitHub.