flowable/flowable-engine · error · ActivitiException
Error deserializing json info for process definition %s
Error message
Error deserializing json info for process definition %s
What it means
When caching a process definition, the deployer loads the stored definition-info JSON blob (ProcessDefinitionInfoEntity.infoJsonId) from the database and deserializes it with Jackson's ObjectMapper into an ObjectNode. If the stored bytes are not valid JSON, an ActivitiException wrapping the parse failure is thrown.
Source
Thrown at modules/flowable5-engine/src/main/java/org/activiti/engine/impl/bpmn/deployer/BpmnDeployer.java:310
ProcessEngineConfigurationImpl processEngineConfiguration, CommandContext commandContext) {
if (!processEngineConfiguration.isEnableProcessDefinitionInfoCache()) {
return;
}
DeploymentManager deploymentManager = processEngineConfiguration.getDeploymentManager();
ProcessDefinitionInfoEntityManager definitionInfoEntityManager = commandContext.getProcessDefinitionInfoEntityManager();
ObjectMapper objectMapper = commandContext.getProcessEngineConfiguration().getObjectMapper();
ProcessDefinitionInfoEntity definitionInfoEntity = definitionInfoEntityManager.findProcessDefinitionInfoByProcessDefinitionId(processDefinition.getId());
ObjectNode infoNode = null;
if (definitionInfoEntity != null && definitionInfoEntity.getInfoJsonId() != null) {
byte[] infoBytes = definitionInfoEntityManager.findInfoJsonById(definitionInfoEntity.getInfoJsonId());
if (infoBytes != null) {
try {
infoNode = (ObjectNode) objectMapper.readTree(infoBytes);
} catch (Exception e) {
throw new ActivitiException("Error deserializing json info for process definition " + processDefinition.getId(), e);
}
}
}
ProcessDefinitionInfoCacheObject definitionCacheObject = new ProcessDefinitionInfoCacheObject();
if (definitionInfoEntity == null) {
definitionCacheObject.setRevision(0);
} else {
definitionCacheObject.setId(definitionInfoEntity.getId());
definitionCacheObject.setRevision(definitionInfoEntity.getRevision());
}
if (infoNode == null) {
infoNode = objectMapper.createObjectNode();
}
definitionCacheObject.setInfoNode(infoNode);
deploymentManager.getProcessDefinitionInfoCache().add(processDefinition.getId(), definitionCacheObject);View on GitHub (pinned to d6d39ce1c6)
Solutions
- Fix or regenerate the JSON in ACT_GE_BYTEARRAY (delete the definition info entity so it is regenerated on next deployment)
- Redeploy the process definition to rewrite the definition info JSON
- Validate the stored JSON bytes with a JSON parser to identify the corruption
Defensive patterns
Strategy: try-catch
Validate before calling
byte[] info = definitionInfoEntityManager.findInfoJsonById(id);
try { new ObjectMapper().readTree(info); } catch (Exception e) { /* corrupted: regenerate definition info */ } Try / catch
try {
processEngine.getProcessEngineConfiguration()... ;
} catch (org.activiti.engine.ActivitiException e) {
if (e.getMessage().contains("Error deserializing json info")) {
// delete/regenerate the process definition info and redeploy
}
} Prevention
- Never hand-edit ACT_GE_BYTEARRAY JSON rows
- Redeploy the definition after upgrading engine versions to refresh definition info
- Back up and restore both ACT_PROCDEF_INFO and ACT_GE_BYTEARRAY together
When it happens
Trigger: addDefinitionInfoToCache (via addProcessDefinitionToCache) when definitionInfoEntityManager.findInfoJsonById returns bytes that objectMapper.readTree cannot parse.
Common situations: Corrupted or manually edited rows in ACT_PROCDEF_INFO / ACT_GE_BYTEARRAY; data restored from backups with truncation; older engine versions writing an incompatible JSON format.
Understand the failure class
Background: "failed to unmarshal" / json.Unmarshal errors: why parsing a response into a Go struct fails and how to fix it — this error's family across 23 libraries.
Related errors
- Error deserializing json info for process definition + proce
- Error reading app resource
- Failed to serialize to a RestVariable instance
- request body could not be transformed to a RestVariable inst
- Error converting request body to RestVariable instance
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/f6d8e8c10fa69e8f.
Report an issue: GitHub.