{"record":{"id":"c55ad7fa0c87fd93","repo":"flowable/flowable-engine","slug":"unable-to-serialize-info-node-infonode","errorCode":null,"errorMessage":"Unable to serialize info node ${infoNode}","messagePattern":"Unable to serialize info node (.+?)","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine/src/main/java/org/flowable/engine/impl/cmd/SaveProcessDefinitionInfoCmd.java","lineNumber":65,"sourceCode":"        }\n\n        if (infoNode == null) {\n            throw new FlowableIllegalArgumentException(\"process definition info node is null\");\n        }\n\n        ProcessDefinitionInfoEntityManager definitionInfoEntityManager = CommandContextUtil.getProcessDefinitionInfoEntityManager(commandContext);\n        ProcessDefinitionInfoEntity definitionInfoEntity = definitionInfoEntityManager.findProcessDefinitionInfoByProcessDefinitionId(processDefinitionId);\n        if (definitionInfoEntity == null) {\n            definitionInfoEntity = definitionInfoEntityManager.create();\n            definitionInfoEntity.setProcessDefinitionId(processDefinitionId);\n            CommandContextUtil.getProcessDefinitionInfoEntityManager().insertProcessDefinitionInfo(definitionInfoEntity);\n        }\n\n        try {\n            ObjectWriter writer = CommandContextUtil.getProcessEngineConfiguration(commandContext).getObjectMapper().writer();\n            CommandContextUtil.getProcessDefinitionInfoEntityManager().updateInfoJson(definitionInfoEntity.getId(), writer.writeValueAsBytes(infoNode));\n        } catch (Exception e) {\n            throw new FlowableException(\"Unable to serialize info node \" + infoNode, e);\n        }\n\n        return null;\n    }\n\n}\n","sourceCodeStart":47,"sourceCodeEnd":72,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine/src/main/java/org/flowable/engine/impl/cmd/SaveProcessDefinitionInfoCmd.java#L47-L72","documentation":"SaveProcessDefinitionInfoCmd.execute wraps any exception from Jackson serialization (or the DB update) in a FlowableException with message \"Unable to serialize info node \" + infoNode. This means the infoNode ObjectNode could not be converted to JSON bytes via the engine's ObjectMapper, or writing/persisting the resulting bytes failed.","triggerScenarios":"writer.writeValueAsBytes(infoNode) throws — e.g. a broken/cyclic node tree, custom value types inside the node the ObjectMapper cannot handle, or the updateInfoJson persistence call failing while the catch block covers the whole try.","commonSituations":"Custom ObjectMapper configuration on the process engine incompatible with the node contents; putting non-JSON-serializable objects into the node via putPOJO without matching serializers; serialization during a command whose DB context later rejects the write.","solutions":["Inspect the wrapped cause 'e' (getCause()) to see the actual Jackson/persistence failure.","Ensure the info node contains only JSON-representable data; convert custom objects via objectMapper.valueToTree() first.","Use the engine's ObjectMapper (processEngineConfiguration.getObjectMapper()) consistently rather than mixing mappers with different modules/configuration."],"exampleFix":"// before\ninfoNode.putPOJO(\"handler\", new MyNonSerializableHandler());\nmanagementService.saveProcessDefinitionInfo(pdId, infoNode);\n// after\nJsonNode handlerNode = objectMapper.valueToTree(myHandler.toDto());\ninfoNode.set(\"handler\", handlerNode);\nmanagementService.saveProcessDefinitionInfo(pdId, infoNode);","handlingStrategy":"try-catch","validationCode":"// validate node contents beforehand\nif (infoNode == null || infoNode.isMissingNode()) {\n    throw new IllegalArgumentException(\"infoNode must be a populated ObjectNode\");\n}\n// dry-run serialize with the engine mapper\nprocessEngineConfiguration.getObjectMapper().writeValueAsBytes(infoNode);","typeGuard":null,"tryCatchPattern":"try {\n    managementService.saveProcessDefinitionInfo(pdId, infoNode);\n} catch (FlowableException e) {\n    Throwable cause = e.getCause();\n    log.error(\"Info node serialization failed: {}\", cause != null ? cause.getMessage() : e.getMessage(), e);\n    throw e;\n}","preventionTips":["Only put JSON-representable data in the node; use objectMapper.valueToTree() for custom objects.","Use the engine's ObjectMapper consistently across all writes.","Always log the cause of wrapped FlowableExceptions to identify the real failure."],"tags":["flowable","json-serialization","jackson","process-definition-info"],"backgroundTag":"json-serialization-failed","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}