{"record":{"id":"1c30f354649ea995","repo":"apache/flink","slug":"corrupt-maxwell-json-message-s","errorCode":null,"errorMessage":"Corrupt Maxwell JSON message '%s'.","messagePattern":"Corrupt Maxwell JSON message '(.+?)'\\.","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"flink-formats/flink-json/src/main/java/org/apache/flink/formats/json/maxwell/MaxwellJsonDeserializationSchema.java","lineNumber":190,"sourceCode":"                genericRowDataList.add(handleRow(row, delete));\n            } else {\n                if (!ignoreParseErrors) {\n                    throw new IOException(\n                            format(\n                                    \"Unknown \\\"type\\\" value \\\"%s\\\". The Maxwell JSON message is '%s'\",\n                                    type, new String(message)));\n                }\n                if (LOG.isDebugEnabled()) {\n                    LOG.debug(\n                            \"Unknown \\\"type\\\" value '{}'. The Maxwell JSON message is '{}'.\",\n                            type,\n                            new String(message));\n                }\n            }\n        } catch (Throwable t) {\n            // a big try catch to protect the processing.\n            if (!ignoreParseErrors) {\n                throw new IOException(\n                        format(\"Corrupt Maxwell JSON message '%s'.\", new String(message)), t);\n            }\n            if (LOG.isDebugEnabled()) {\n                LOG.debug(\"Corrupt Maxwell JSON message '{}'.\", new String(message), t);\n            }\n        }\n        for (GenericRowData genericRowData : genericRowDataList) {\n            out.collect(genericRowData);\n        }\n    }\n\n    private GenericRowData handleRow(GenericRowData rootRow, GenericRowData physicalRow) {\n        // shortcut in case no output projection is required\n        if (!hasMetadata) {\n            return physicalRow;\n        }\n        final int metadataArity = metadataConverters.length;\n        final GenericRowData producedRow =","sourceCodeStart":172,"sourceCodeEnd":208,"githubUrl":"https://github.com/apache/flink/blob/2f3c205e9266cb30240eb7f4fdab15cad629a70f/flink-formats/flink-json/src/main/java/org/apache/flink/formats/json/maxwell/MaxwellJsonDeserializationSchema.java#L172-L208","documentation":"The outermost catch in MaxwellJsonDeserializationSchema.deserialize(byte[], Collector) wraps any Throwable raised while deserializing the raw JSON into a RowData and extracting 'data'/'old'/'type'. With ignore-parse-errors = false this becomes an IOException('Corrupt Maxwell JSON message ...') carrying the original cause; with ignore-parse-errors = true the message is skipped (debug-logged) and no rows are emitted.","triggerScenarios":"Malformed JSON bytes on the topic; a message that parses as JSON but does not match the expected Maxwell structure (missing 'data' object, wrong types) causing ClassCastException/NullPointer inside the try block; a payload that fails the table's declared physical schema conversion.","commonSituations":"Mixing plain JSON and Maxwell JSON on one topic; declaring a table schema whose field types cannot hold the JSON values (e.g. INT column receiving a string); truncated messages from a misbehaving producer.","solutions":["Inspect the cause chain and the printed message bytes to identify whether it is malformed JSON or a schema mismatch.","Align the DDL column types with the Maxwell 'data' payload types (or use 'maxwell-json.timestamp-format' / schema inference via 'maxwell-json.schema-include' where applicable).","Enable 'maxwell-json.ignore-parse-errors' = true only if skipping bad records is acceptable."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { schema.deserialize(message, collector); } catch (IOException e) { metrics.corruptMessages.inc(); deadLetterQueue.write(message, e.getCause()); }","preventionTips":["Validate topic content type before attaching the maxwell-json source.","Align DDL column types with the Maxwell payload; consider dead-lettering corrupt bytes."],"tags":["flink","maxwell","json","deserialization","corrupt-data"],"backgroundTag":null,"analyzedSha":"2f3c205e9266cb30240eb7f4fdab15cad629a70f","analyzedAt":"2026-08-14T08:48:24.518Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}