flowable/flowable-engine · error · FlowableIllegalArgumentException
entityClass is null
Error message
entityClass is null
What it means
GetTableNameCmd maps an entity class to its database table name using EntityToTableMap and prepends the configured database table prefix. It throws FlowableIllegalArgumentException when the entityClass parameter is null, because a null class cannot be mapped to a table.
Solutions
- Pass the entity class literal, e.g. dmnManagementService.getTableName(HistoricDecisionExecutionEntityImpl.class)
- Fix the reflection/generic code that produced a null Class
- Verify the class passed is a DMN engine entity known to EntityToTableMap
Example fix
// before
String table = managementService.getTableName(entityClass); // entityClass may be null
// after
if (entityClass == null) {
entityClass = HistoricDecisionExecutionEntityImpl.class;
}
String table = managementService.getTableName(entityClass); Defensive patterns
Strategy: type-guard
Validate before calling
if (entityClass == null) {
throw new IllegalArgumentException("entityClass required");
} Type guard
boolean isEntityClass(Class<?> c) { return c != null && EntityToTableMap.getTableName(c) != null; } Try / catch
try {
table = managementService.getTableName(entityClass);
} catch (FlowableIllegalArgumentException e) {
log.warn("getTableName called with null class");
table = null;
} Prevention
- Pass class literals directly instead of reflective Class resolution that can yield null
- Default to a known entity class when generics erase to null
- Keep a map of supported entity classes in your own code
When it happens
Trigger: Calling DmnManagementService.getTableName(null) or building new GetTableNameCmd(null).
Common situations: Reflection code that resolved the entity Class dynamically and got null, generics erased to a null Class token, or passing a non-entity type through a generic helper.
Related errors
- Decision table id is null
- decisionTableId is null
- Deployment id is null
- deploymentId is null
- deploymentId is null
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/85280dcca7c05045.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/cmd/GetTableNameCmd.java:37
import org.flowable.common.engine.api.FlowableIllegalArgumentException;
import org.flowable.common.engine.impl.interceptor.Command;
import org.flowable.common.engine.impl.interceptor.CommandContext;
import org.flowable.dmn.engine.impl.db.EntityToTableMap;
public class GetTableNameCmd implements Command<String>, Serializable {
private static final long serialVersionUID = 1L;
private Class<?> entityClass;
public GetTableNameCmd(Class<?> entityClass) {
this.entityClass = entityClass;
}
@Override
public String execute(CommandContext commandContext) {
if (entityClass == null) {
throw new FlowableIllegalArgumentException("entityClass is null");
}
String databaseTablePrefix = getDbSqlSession(commandContext).getDbSqlSessionFactory().getDatabaseTablePrefix();
String tableName = EntityToTableMap.getTableName(entityClass);
return databaseTablePrefix + tableName;
}
}
View on GitHub (pinned to d6d39ce1c6)