flowable/flowable-engine · error · FlowableIllegalArgumentException

The config is null

Error message

The config is null

What it means

ManagementServiceImpl.executeCommand(CommandConfig, Command) validates both parameters before delegating to the command executor. It throws FlowableIllegalArgumentException when the CommandConfig is null, because the interceptor chain that wraps the command requires a config (e.g. default or custom retry/log configuration). This is a fail-fast null-argument guard.

Source

Thrown at modules/flowable-engine/src/main/java/org/flowable/engine/impl/ManagementServiceImpl.java:431

                ProcessEngineConfigurationImpl engineConfiguration = CommandContextUtil.getProcessEngineConfiguration(commandContext);
                engineConfiguration.getCommonSchemaManager().schemaUpdate();
                return engineConfiguration.getSchemaManager().schemaUpdate();
            }
        });
    }

    @Override
    public <T> T executeCommand(Command<T> command) {
        if (command == null) {
            throw new FlowableIllegalArgumentException("The command is null");
        }
        return commandExecutor.execute(command);
    }

    @Override
    public <T> T executeCommand(CommandConfig config, Command<T> command) {
        if (config == null) {
            throw new FlowableIllegalArgumentException("The config is null");
        }
        if (command == null) {
            throw new FlowableIllegalArgumentException("The command is null");
        }
        return commandExecutor.execute(config, command);
    }

    @Override
    public LockManager getLockManager(String lockName) {
        return new LockManagerImpl(commandExecutor, lockName, getConfiguration().getLockPollRate(), configuration.getEngineCfgKey());
    }

    @Override
    public <MapperType, ResultType> ResultType executeCustomSql(CustomSqlExecution<MapperType, ResultType> customSqlExecution) {
        Class<MapperType> mapperClass = customSqlExecution.getMapperClass();
        return commandExecutor.execute(new ExecuteCustomSqlCmd<>(mapperClass, customSqlExecution));
    }

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Pass an explicit config, e.g. managementService.executeCommand(new DefaultCommandConfig(), command)
  2. Fall back to the single-argument overload executeCommand(command) which uses the default config
  3. Null-check the config before invoking and substitute processEngineConfiguration.getDefaultCommandConfig()
  4. Review config-loading code for missing defaults

Example fix

// before
CommandConfig cfg = loadConfig(); // may return null
managementService.executeCommand(cfg, cmd);
// after
CommandConfig cfg = loadConfig();
if (cfg == null) {
    cfg = processEngineConfiguration.getDefaultCommandConfig();
}
managementService.executeCommand(cfg, cmd);
Defensive patterns

Strategy: type-guard

Validate before calling

if (config == null) { config = processEngineConfiguration.getDefaultCommandConfig(); }
managementService.executeCommand(config, command);

Type guard

boolean hasConfig(CommandConfig c) { return c != null; }

Try / catch

try {
    managementService.executeCommand(config, command);
} catch (FlowableIllegalArgumentException e) {
    log.error("executeCommand rejected arguments: {}", e.getMessage());
}

Prevention

When it happens

Trigger: Calling managementService.executeCommand(config, command) with a null config, e.g. when the config was resolved from configuration that was absent, or a helper returning null config.

Common situations: Developers copying the single-argument executeCommand overload and adding a config sourced from a properties map that returned null; refactoring around CommandConfigFactory; dynamic config selection logic with no default branch.

Related errors


AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11). Data as JSON: /api/errors/deadd780695fce07. Report an issue: GitHub.