{"record":{"id":"f59ef26d113cc2f2","repo":"flowable/flowable-engine","slug":"the-config-is-null","errorCode":null,"errorMessage":"The config is null","messagePattern":"The config is null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/CmmnManagementServiceImpl.java","lineNumber":352,"sourceCode":"    public void unacquireAllExternalWorkerJobsForWorker(String workerId, String tenantId) {\n        commandExecutor.execute(new UnacquireAllExternalWorkerJobsForWorkerCmd(workerId, tenantId, configuration.getJobServiceConfiguration()));\n    }\n    \n    @Override\n    public ChangeTenantIdBuilder createChangeTenantIdBuilder(String fromTenantId, String toTenantId) {\n        return new ChangeTenantIdBuilderImpl(fromTenantId, toTenantId, configuration.getChangeTenantIdManager());\n    }\n\n    public <T> T executeCommand(Command<T> command) {\n        if (command == null) {\n            throw new FlowableIllegalArgumentException(\"The command is null\");\n        }\n        return commandExecutor.execute(command);\n    }\n\n    public <T> T executeCommand(CommandConfig config, Command<T> command) {\n        if (config == null) {\n            throw new FlowableIllegalArgumentException(\"The config is null\");\n        }\n        if (command == null) {\n            throw new FlowableIllegalArgumentException(\"The command is null\");\n        }\n        return commandExecutor.execute(config, command);\n    }\n    \n    @Override\n    public LockManager getLockManager(String lockName) {\n        return new LockManagerImpl(commandExecutor, lockName, getConfiguration().getLockPollRate(), configuration.getEngineCfgKey());\n    }\n\n}\n","sourceCodeStart":334,"sourceCodeEnd":366,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/CmmnManagementServiceImpl.java#L334-L366","documentation":"Null check in CmmnManagementServiceImpl.executeCommand(CommandConfig, Command): a null CommandConfig (the txfactory/retry/timeout config) is rejected before execution. The config decides how the command runs (transaction handling), so it is required.","triggerScenarios":"Calling cmmnManagementService.executeCommand(null, someCommand).","commonSituations":"Caching a CommandConfig in a field never initialized; receiving config from a lookup that returned null; copy-paste between the one-arg and two-arg executeCommand variants.","solutions":["Use a valid config, e.g. commandExecutor's defaultConfig or new StandaloneTaskCommandConfig() / appropriate CommandConfig","Guard the config lookup: fall back to a default when the resolved config is null","Check initialization order so the config field is set before first use"],"exampleFix":"// before\ncmmnManagementService.executeCommand(cfg, cmd); // cfg may be null\n// after\nCommandConfig cfg = resolveConfigOrDefault();\ncmmnManagementService.executeCommand(cfg != null ? cfg : new CommandConfig(), cmd);","handlingStrategy":"validation","validationCode":"CommandConfig cfg = resolveConfig(); if (cfg == null) cfg = new CommandConfig();","typeGuard":null,"tryCatchPattern":"try { managementService.executeCommand(cfg, cmd); } catch (FlowableIllegalArgumentException e) { /* null config */ }","preventionTips":["Initialize CommandConfig fields eagerly at bootstrap","Default to a standard CommandConfig when lookup fails","Don't confuse the one-arg and two-arg executeCommand overloads"],"tags":["java","null-check","command","validation"],"backgroundTag":"null-argument","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}