{"record":{"id":"9c5bddbd09c311ef","repo":"apache/beam","slug":"unable-to-parse-row","errorCode":null,"errorMessage":"Unable to parse Row","messagePattern":"Unable to parse Row","errorType":"validation","errorClass":"UnsupportedRowJsonException","httpStatus":null,"severity":"error","filePath":"sdks/java/core/src/main/java/org/apache/beam/sdk/util/RowJsonUtils.java","lineNumber":138,"sourceCode":"\n    return objectMapper;\n  }\n\n  public static ObjectMapper newObjectMapperWith(RowJson.RowJsonSerializer serializer) {\n    SimpleModule module = new SimpleModule(\"rowSerializationModule\");\n    module.addSerializer(Row.class, serializer);\n\n    ObjectMapper objectMapper = new ObjectMapper(createJsonFactory(MAX_STRING_LENGTH));\n    objectMapper.registerModule(module);\n\n    return objectMapper;\n  }\n\n  public static Row jsonToRow(ObjectMapper objectMapper, String jsonString) {\n    try {\n      return objectMapper.readValue(jsonString, Row.class);\n    } catch (JsonParseException | JsonMappingException jsonException) {\n      throw new UnsupportedRowJsonException(\"Unable to parse Row\", jsonException);\n    } catch (IOException e) {\n      throw new IllegalArgumentException(\"Unable to parse json object: \" + jsonString, e);\n    }\n  }\n\n  public static String rowToJson(ObjectMapper objectMapper, Row row) {\n    try {\n      return objectMapper.writeValueAsString(row);\n    } catch (JsonProcessingException e) {\n      throw new IllegalArgumentException(\"Unable to serialize row: \" + row, e);\n    }\n  }\n}\n","sourceCodeStart":120,"sourceCodeEnd":152,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/core/src/main/java/org/apache/beam/sdk/util/RowJsonUtils.java#L120-L152","documentation":"RowJsonUtils.jsonToRow wraps Jackson's JsonParseException/JsonMappingException (both IOException subclasses handled first) into UnsupportedRowJsonException('Unable to parse Row'). It means the JSON string is malformed or violates the Row schema mapping, and the underlying Jackson exception carries the detail.","triggerScenarios":"Calling jsonToRow(objectMapper, jsonString) with syntactically invalid JSON, or JSON that fails Row deserialization (schema violations like missing fields, wrong types), including errors 710-715 bubbling up through Jackson.","commonSituations":"Truncated/corrupted payloads from queues or files; wrong content type feeding JSON parsing; schema/JSON drift; nested UnsupportedRowJsonException surfaced with this generic wrapper.","solutions":["Inspect the cause (getCause()) for the precise Jackson/RowJson error","Validate/pretty-print the JSON string to confirm syntactic validity","Verify the ObjectMapper is configured with the RowJson module/creator for Row","Fix the payload per the underlying cause; catch UnsupportedRowJsonException for graceful handling"],"exampleFix":"try {\n  Row row = RowJsonUtils.jsonToRow(mapper, json);\n} catch (RowJson.UnsupportedRowJsonException e) {\n  LOG.error(\"Row parse failed: {}\", e.getCause(), e);\n}","handlingStrategy":"try-catch","validationCode":"try { new ObjectMapper().readTree(jsonString); } catch (IOException e) { throw new IllegalArgumentException(\"Invalid JSON\", e); }","typeGuard":null,"tryCatchPattern":"try { Row r = RowJsonUtils.jsonToRow(mapper, json); } catch (RowJson.UnsupportedRowJsonException e) { JsonProcessingException cause = (JsonProcessingException) e.getCause(); /* inspect cause location/detail */ }","preventionTips":["Validate JSON syntax before parsing to Row","Always inspect getCause() for the real error","Keep the ObjectMapper configured with the RowJson module","Version-pin schemas between producer and consumer"],"tags":["beam","json","parsing","deserialization"],"backgroundTag":"json-parse-error","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}