{"record":{"id":"2358cc8c58959857","repo":"conductor-oss/conductor","slug":"error-de-serializing-json","errorCode":null,"errorMessage":"Error de-serializing json","messagePattern":"Error de-serializing json","errorType":"exception","errorClass":"NonTransientException","httpStatus":500,"severity":"error","filePath":"cassandra-persistence/src/main/java/com/netflix/conductor/cassandra/dao/CassandraBaseDAO.java","lineNumber":316,"sourceCode":"                .addPartitionKey(EVENT_HANDLER_NAME_KEY, DataType.text())\n                .addClusteringColumn(EVENT_EXECUTION_ID_KEY, DataType.text())\n                .addColumn(PAYLOAD_KEY, DataType.text())\n                .getQueryString();\n    }\n\n    String toJson(Object value) {\n        try {\n            return objectMapper.writeValueAsString(value);\n        } catch (JsonProcessingException e) {\n            throw new NonTransientException(\"Error serializing to json\", e);\n        }\n    }\n\n    <T> T readValue(String json, Class<T> clazz) {\n        try {\n            return objectMapper.readValue(json, clazz);\n        } catch (IOException e) {\n            throw new NonTransientException(\"Error de-serializing json\", e);\n        }\n    }\n\n    void recordCassandraDaoRequests(String action) {\n        recordCassandraDaoRequests(action, \"n/a\", \"n/a\");\n    }\n\n    void recordCassandraDaoRequests(String action, String taskType, String workflowType) {\n        Monitors.recordDaoRequests(DAO_NAME, action, taskType, workflowType);\n    }\n\n    void recordCassandraDaoEventRequests(String action, String event) {\n        Monitors.recordDaoEventRequests(DAO_NAME, action, event);\n    }\n\n    void recordCassandraDaoPayloadSize(\n            String action, int size, String taskType, String workflowType) {\n        Monitors.recordDaoPayloadSize(DAO_NAME, action, taskType, workflowType, size);","sourceCodeStart":298,"sourceCodeEnd":334,"githubUrl":"https://github.com/conductor-oss/conductor/blob/cf7c3e4a8adfb158be778ab1ec525323c363cd3a/cassandra-persistence/src/main/java/com/netflix/conductor/cassandra/dao/CassandraBaseDAO.java#L298-L334","documentation":"Thrown by CassandraBaseDAO.readValue when ObjectMapper.readValue fails while deserializing a JSON string from Cassandra into a typed object. IOException is wrapped in NonTransientException. Used to reconstruct EventHandler/WorkflowModel/TaskModel from stored text payloads.","triggerScenarios":"Calling readValue(String json, Class<T> clazz) on a payload whose JSON no longer matches the target class schema — missing fields, type changes, or truncated/corrupt JSON read from Cassandra.","commonSituations":"Schema migration that changed a model field type or removed a required field, making stored rows fail to deserialize. Corrupted/truncated payload text. A Jackson version change tightening deserialization defaults.","solutions":["Read the wrapped IOException cause to find the unmappable field.","If a model field type changed, make the old form backward-compatible (custom deserializer, @JsonAlias, or nullable/optional field).","Run a data audit for rows whose payload cannot be parsed and migrate or quarantine them.","Pin a consistent ObjectMapper and Jackson version across read/write paths."],"exampleFix":"// before\nthrow new NonTransientException(\"Error de-serializing json\", e);\n\n// after\nthrow new NonTransientException(\n    \"Error de-serializing json into \" + clazz.getName() + \": \" + json, e);","handlingStrategy":"try-catch","validationCode":"// Validate payload is parseable JSON of the expected type before trusting stored rows\nobjectMapper.readReturnValue(json, EventHandler.class); // surface schema drift early","typeGuard":null,"tryCatchPattern":"try {\n    return readValue(json, clazz);\n} catch (NonTransientException e) {\n    log.warn(\"Failed to deserialize into {}: {}\", clazz.getSimpleName(), json);\n    throw e;\n}","preventionTips":["Keep model changes backward-compatible (nullable fields, @JsonAlias) when rows persist across versions.","Pin a single ObjectMapper and Jackson version across read/write paths.","Run a deserialization audit job after schema migrations and quarantine unparseable rows."],"tags":["cassandra","json-deserialization","jackson","persistence"],"backgroundTag":null,"analyzedSha":"cf7c3e4a8adfb158be778ab1ec525323c363cd3a","analyzedAt":"2026-08-14T03:33:19.897Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}