apache/seatunnel · error · StarRocksConnectorException
ILLEGAL_ARGUMENT
ILLEGAL_ARGUMENT
Error message
Failed to parse delimiter: `Hex str is empty`
What it means
StarRocksDelimiterParser.parse handles delimiters given in hex form like '\x09'. When the value starts with \x (case-insensitive), the remainder after '\X' is treated as hex; if that remainder is empty (the delimiter is literally '\x' or '\X'), an ILLEGAL_ARGUMENT StarRocksConnectorException is thrown because an empty hex string encodes no separator.
Solutions
- Provide the full hex encoding of the delimiter, e.g. "\\x09" for tab or "\\x2C" for comma
- Use the literal character instead (e.g. delimiter = "\t") if hex encoding isn't needed
- Validate the delimiter config before submitting the job
Example fix
// before delimiter = "\\x" // after delimiter = "\\x09" // or a literal "\t"
Defensive patterns
Strategy: validation
Validate before calling
String d = config.getString("delimiter"); if (d != null && d.toUpperCase().startsWith("\\X") && d.length() <= 2) throw new IllegalArgumentException("hex delimiter needs digits after \\x, e.g. \\x09"); Type guard
boolean isCompleteHexDelimiter(String s) { return !(s.toUpperCase().startsWith("\\X")) || s.length() > 2; } Try / catch
try { submitJob(cfg); } catch (StarRocksConnectorException e) { if (e.getErrorCode() == CommonErrorCodeDeprecated.ILLEGAL_ARGUMENT && e.getMessage().contains("Failed to parse delimiter")) { /* fix delimiter value in config */ } throw e; } Prevention
- Always write hex delimiters with at least two hex digits (\\x09, \\x01)
- Prefer literal characters for printable delimiters
- Validate delimiter values in your config pipeline before submission
When it happens
Trigger: Configuring a delimiter option as "\\x" or "\\X" with no hex digits following — e.g. delimiter = "\\x" in the HOCON file.
Common situations: Copy-paste errors truncating '\\x09' to '\\x'; misunderstanding the hex-delimiter feature and thinking \\x alone means 'hex mode'.
Understand the failure class
Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
Related errors
- CONFIG_VALIDATION_FAILED
- CREATE_BE_READER_FAILED
- accessId and accesskey must be provided when sts_token is…
- Agent config is not a readable file
- agent.id must be non-empty after resolution.
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/148dce16e415bf31.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-connectors-v2/connector-starrocks/src/main/java/org/apache/seatunnel/connectors/seatunnel/starrocks/serialize/StarRocksDelimiterParser.java:42
import java.io.StringWriter;
public class StarRocksDelimiterParser {
private static final int SHIFT = 4;
private static final String HEX_STRING = "0123456789ABCDEF";
public static String parse(String sp, String dSp) throws RuntimeException {
if (Strings.isNullOrEmpty(sp)) {
return dSp;
}
if (!sp.toUpperCase().startsWith("\\X")) {
return sp;
}
String hexStr = sp.substring(2);
// check hex str
if (hexStr.isEmpty()) {
throw new StarRocksConnectorException(
CommonErrorCodeDeprecated.ILLEGAL_ARGUMENT,
"Failed to parse delimiter: `Hex str is empty`");
}
if (hexStr.length() % 2 != 0) {
throw new StarRocksConnectorException(
CommonErrorCodeDeprecated.ILLEGAL_ARGUMENT,
"Failed to parse delimiter: `Hex str is empty`");
}
for (char hexChar : hexStr.toUpperCase().toCharArray()) {
if (HEX_STRING.indexOf(hexChar) == -1) {
throw new StarRocksConnectorException(
CommonErrorCodeDeprecated.ILLEGAL_ARGUMENT,
"Failed to parse delimiter: `Hex str is empty`");
}
}
// transform to separator
StringWriter writer = new StringWriter();
for (byte b : hexStrToBytes(hexStr)) {View on GitHub (pinned to cf67b549a7)