flowable/flowable-engine · error · org.flowable.common.engine.api.FlowableIllegalArgumentException

tableName is null

Error message

tableName is null

What it means

GetTableMetaDataCmd.execute validates its tableName field before querying table metadata via the engine's TableDataManager. If the command was constructed with a null table name, it throws FlowableIllegalArgumentException. This is a guard against issuing a meaningless metadata lookup against the database.

Solutions

  1. Pass a valid, non-null table name when constructing GetTableMetaDataCmd (e.g. "ACT_RU_TASK").
  2. Null-check / validate the table name before creating and executing the command.
  3. If the name comes from user input or config, trim and validate it before dispatching the command.

Example fix

// before
new GetTableMetaDataCmd(engineType, tableName).execute(commandContext);
// after
if (tableName == null) throw new IllegalArgumentException("tableName required");
new GetTableMetaDataCmd(engineType, tableName).execute(commandContext);
Defensive patterns

Strategy: validation

Validate before calling

if (tableName == null || tableName.trim().isEmpty()) throw new IllegalArgumentException("tableName must be a non-empty Flowable table name");

Try / catch

try { return managementService.executeCommand(new GetTableMetaDataCmd(engineType, table)); } catch (FlowableIllegalArgumentException e) { return null; }

Prevention

When it happens

Trigger: Calling GetTableMetaDataCmd (e.g. via managementService.executeCommand(new GetTableMetaDataCmd(engineType, null))) or invoking the management-service table metadata API with a null tableName argument.

Common situations: Programmatic table inspection tools passing a dynamically-resolved table name that turns out null; copying example code and forgetting to set the table name; refactoring that removed the name argument.

Related errors


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

Appendix: source

Thrown at modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/cmd/GetTableMetaDataCmd.java:40

/**
 * @author Joram Barrez
 */
public class GetTableMetaDataCmd implements Command<TableMetaData>, Serializable {

    private static final long serialVersionUID = 1L;
    
    protected String tableName;
    protected String engineType;

    public GetTableMetaDataCmd(String tableName, String engineType) {
        this.tableName = tableName;
        this.engineType = engineType;
    }

    @Override
    public TableMetaData execute(CommandContext commandContext) {
        if (tableName == null) {
            throw new FlowableIllegalArgumentException("tableName is null");
        }
        return commandContext.getEngineConfigurations().get(engineType).getTableDataManager().getTableMetaData(tableName);
    }

}

View on GitHub (pinned to d6d39ce1c6)