flowable/flowable-engine · error · ActivitiException
Unable to serialize info node " + infoNode
Error message
Unable to serialize info node " + infoNode
What it means
SaveProcessDefinitionInfoCmd serializes the given JsonNode (infoNode) with the engine's ObjectMapper via writer.writeValueAsBytes(infoNode) and persists it. If any exception occurs during serialization (invalid node, mapper failure) the command wraps it in an ActivitiException with this message, preserving the cause.
Source
Thrown at modules/flowable5-engine/src/main/java/org/activiti/engine/impl/cmd/SaveProcessDefinitionInfoCmd.java:66
if (infoNode == null) {
throw new ActivitiIllegalArgumentException("process definition info node is null");
}
ProcessDefinitionInfoEntityManager definitionInfoEntityManager = commandContext.getProcessDefinitionInfoEntityManager();
ProcessDefinitionInfoEntity definitionInfoEntity = definitionInfoEntityManager.findProcessDefinitionInfoByProcessDefinitionId(processDefinitionId);
if (definitionInfoEntity == null) {
definitionInfoEntity = new ProcessDefinitionInfoEntity();
definitionInfoEntity.setProcessDefinitionId(processDefinitionId);
commandContext.getProcessDefinitionInfoEntityManager().insertProcessDefinitionInfo(definitionInfoEntity);
} else {
commandContext.getProcessDefinitionInfoEntityManager().updateProcessDefinitionInfo(definitionInfoEntity);
}
try {
ObjectWriter writer = commandContext.getProcessEngineConfiguration().getObjectMapper().writer();
commandContext.getProcessDefinitionInfoEntityManager().updateInfoJson(definitionInfoEntity.getId(), writer.writeValueAsBytes(infoNode));
} catch (Exception e) {
throw new ActivitiException("Unable to serialize info node " + infoNode, e);
}
return null;
}
}
View on GitHub (pinned to d6d39ce1c6)
Solutions
- Inspect the wrapped cause exception (getCause()) to find the actual Jackson serialization failure.
- Validate the infoNode can be serialized in your code: new ObjectMapper().writeValueAsString(infoNode) before calling the command.
- Check the engine's ObjectMapper configuration for faulty registered modules or serialization features.
Example fix
// before
managementService.executeCommand(new SaveProcessDefinitionInfoCmd(processDefinitionId, infoNode));
// after
try {
objectMapper.writeValueAsString(infoNode); // fail fast, with a clearer error
managementService.executeCommand(new SaveProcessDefinitionInfoCmd(processDefinitionId, infoNode));
} catch (JsonProcessingException e) {
throw new IllegalArgumentException("Invalid info node JSON: " + e.getMessage(), e);
} Defensive patterns
Strategy: validation
Validate before calling
if (infoNode == null || infoNode.isMissingNode()) throw new IllegalArgumentException("infoNode required");
try { objectMapper.writeValueAsString(infoNode); } catch (JsonProcessingException e) { /* fail fast with clear error */ } Try / catch
try { managementService.executeCommand(new SaveProcessDefinitionInfoCmd(pdId, infoNode)); }
catch (ActivitiException e) { log.error("info node serialization failed", e.getCause()); } Prevention
- Pre-serialize the node locally to fail fast
- Keep the engine ObjectMapper configuration simple and tested
- Log the cause, not just the ActivitiException wrapper
When it happens
Trigger: Calling ProcessEngine.getProcessEngineConfiguration()/ManagementService-style API that executes SaveProcessDefinitionInfoCmd with an infoNode that Jackson cannot serialize, e.g. a JsonNode whose writeValueAsBytes throws (rare, but possible with a broken/oversized tree or misconfigured ObjectMapper).
Common situations: Custom ObjectMapper configured with unsupported features (e.g. failing modules), an infoNode built from invalid input, or a serialization timeout/failure on a very large process definition info JSON.
Understand the failure class
Background: "JSON serialization failed", "not JSON serializable", "Failed to serialize": why JSON marshaling errors happen and how to fix them — this error's family across 46 libraries.
Related errors
- Error writing form model response
- Failed to parse jase
- An error occurs converting output value as JSon
- Error writing app model to json
- Failed to serialize to a RestVariable instance
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/279fdead3bb8e446.
Report an issue: GitHub.