{"record":{"id":"df7aaa81d8f21bf0","repo":"flowable/flowable-engine","slug":"error-reading-json-value-configuration","errorCode":null,"errorMessage":"Error reading json value ${configuration}","messagePattern":"Error reading json value (.+?)","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable5-engine/src/main/java/org/activiti/engine/impl/jobexecutor/TimerActivateProcessDefinitionHandler.java","lineNumber":45,"sourceCode":"public class TimerActivateProcessDefinitionHandler extends TimerChangeProcessDefinitionSuspensionStateJobHandler {\n\n    public static final String TYPE = \"activate-processdefinition\";\n\n    @Override\n    public String getType() {\n        return TYPE;\n    }\n\n    @Override\n    public void execute(Job job, String configuration, ExecutionEntity execution, CommandContext commandContext) {\n        ProcessEngineConfigurationImpl processEngineConfiguration = commandContext.getProcessEngineConfiguration();\n\n        boolean activateProcessInstances = false;\n        try {\n            JsonNode configNode = processEngineConfiguration.getObjectMapper().readTree(configuration);\n            activateProcessInstances = getIncludeProcessInstances(configNode);\n        } catch (Exception e) {\n            throw new FlowableException(\"Error reading json value \" + configuration, e);\n        }\n\n        String processDefinitionId = job.getProcessDefinitionId();\n\n        ActivateProcessDefinitionCmd activateProcessDefinitionCmd = new ActivateProcessDefinitionCmd(processDefinitionId, null, activateProcessInstances, null, job.getTenantId());\n        activateProcessDefinitionCmd.execute(commandContext);\n    }\n\n}\n","sourceCodeStart":27,"sourceCodeEnd":55,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable5-engine/src/main/java/org/activiti/engine/impl/jobexecutor/TimerActivateProcessDefinitionHandler.java#L27-L55","documentation":"TimerActivateProcessDefinitionHandler.execute parses the timer job's configuration string as JSON to read the includeProcessInstances flag. If readTree or getIncludeProcessInstances throws for any reason, it wraps the failure in a FlowableException with the raw configuration in the message. This means the persisted job configuration is malformed or incompatible with the current mapper.","triggerScenarios":"A timer-start/timer job for activating a suspended process definition fires with a configuration string that is not valid JSON, is empty, or lacks the expected structure.","commonSituations":"Job configuration written by a different engine version (schema change); manually edited ACT_RU_JOB/ACT_RU_TIMER_JOB rows; corrupted configuration after failed deployment or DB migration; custom job handler overwrote the configuration.","solutions":["Inspect the job's CONFIGURATION_ column and repair it to valid JSON like {\"includeProcessInstances\":false,\"processDefinitionId\":\"...\"}","Delete the corrupted timer job and re-create the boundary/timer event or re-suspend/activate the process definition","Check engine version migration of flowable job tables; run any pending schema upgrades","Exclude null/legacy configuration rows from old versions or re-fire them manually"],"exampleFix":"// corrupted row\nUPDATE ACT_RU_TIMER_JOB SET CONFIGURATION_ = '{\"includeProcessInstances\":false,\"processDefinitionId\":\"pdef:1:4\"}' WHERE ID_ = 'job-7';","handlingStrategy":"try-catch","validationCode":"String cfg = job.getConfiguration();\nif (cfg == null || cfg.isBlank()) throw new IllegalStateException(\"Timer job configuration empty\");\nnew ObjectMapper().readTree(cfg); // throws early if invalid","typeGuard":"boolean isValidJson(String s) {\n    try { new ObjectMapper().readTree(s); return true; } catch (Exception e) { return false; }\n}","tryCatchPattern":"try {\n    managementService.executeJob(jobId);\n} catch (FlowableException e) {\n    if (e.getMessage() != null && e.getMessage().startsWith(\"Error reading json value\")) {\n        // inspect/repair ACT_RU_TIMER_JOB.CONFIGURATION_ then retry\n    } else throw e;\n}","preventionTips":["Never hand-edit job configuration columns; use engine APIs","Run schema migration scripts when upgrading engine versions","Monitor dead-lettered jobs whose configuration cannot be parsed"],"tags":["timer","json","jobs"],"backgroundTag":"json-parse-error","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}