apache/flink · error · UTFDataFormatException
malformed input around byte {}
Error message
malformed input around byte {} What it means
Error "malformed input around byte {}" thrown in apache/flink.
Source
Thrown at flink-core/src/main/java/org/apache/flink/types/Record.java:1500
case 4:
case 5:
case 6:
case 7:
/* 0xxxxxxx */
count++;
chararr[chararr_count++] = (char) c;
break;
case 12:
case 13:
/* 110x xxxx 10xx xxxx */
count += 2;
if (count > utflen) {
throw new UTFDataFormatException(
"malformed input: partial character at end");
}
char2 = (int) bytearr[count - 1];
if ((char2 & 0xC0) != 0x80) {
throw new UTFDataFormatException(
"malformed input around byte " + count);
}
chararr[chararr_count++] = (char) (((c & 0x1F) << 6) | (char2 & 0x3F));
break;
case 14:
/* 1110 xxxx 10xx xxxx 10xx xxxx */
count += 3;
if (count > utflen) {
throw new UTFDataFormatException(
"malformed input: partial character at end");
}
char2 = (int) bytearr[count - 2];
char3 = (int) bytearr[count - 1];
if (((char2 & 0xC0) != 0x80) || ((char3 & 0xC0) != 0x80)) {
throw new UTFDataFormatException(
"malformed input around byte " + (count - 1));
}
chararr[chararr_count++] =View on GitHub (pinned to 2f3c205e92)
Solutions
- Address the cause reported by the error message: malformed input around byte the reported value
- Verify the inputs, configuration values, and classpath/dependency setup related to this operation, then retry.
Example fix
Correct the condition described ("malformed input around byte the reported value") and rerun the job or command. When it happens
Trigger: Triggered at runtime when the operation fails because: malformed input around byte the reported value.
Common situations: Commonly caused by misconfiguration, missing dependencies or files, unsupported types or operations, or invalid user input leading to: malformed input around byte the reported value.
Understand the failure class
- Parsing and encoding errors: unexpected token, malformed input — why parsers reject input and how to find the real culprit.
AI-assisted analysis of apache/flink@2f3c205e92 (2026-08-14).
Data as JSON: /api/errors/b04e22e8ec6e2163.
Report an issue: GitHub.