flowable/flowable-engine · error · FlowableIllegalArgumentException
nameLike is null
Error message
nameLike is null
What it means
FlowableIllegalArgumentException thrown by CaseDefinitionQueryImpl.caseDefinitionNameLike(String) when the nameLike pattern is null. Like-style filters accept SQL wildcards (%, _) but never null; the engine validates eagerly so the query fails at build time instead of generating invalid SQL. To match all definitions, simply do not call the setter.
Source
Thrown at modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/repository/CaseDefinitionQueryImpl.java:132
throw new FlowableIllegalArgumentException("categoryNotEquals is null");
}
this.categoryNotEquals = categoryNotEquals;
return this;
}
@Override
public CaseDefinitionQueryImpl caseDefinitionName(String name) {
if (name == null) {
throw new FlowableIllegalArgumentException("name is null");
}
this.name = name;
return this;
}
@Override
public CaseDefinitionQueryImpl caseDefinitionNameLike(String nameLike) {
if (nameLike == null) {
throw new FlowableIllegalArgumentException("nameLike is null");
}
this.nameLike = nameLike;
return this;
}
@Override
public CaseDefinitionQueryImpl caseDefinitionNameLikeIgnoreCase(String nameLikeIgnoreCase) {
if (nameLikeIgnoreCase == null) {
throw new FlowableIllegalArgumentException("nameLikeIgnoreCase is null");
}
this.nameLikeIgnoreCase = nameLikeIgnoreCase;
return this;
}
@Override
public CaseDefinitionQueryImpl deploymentId(String deploymentId) {
if (deploymentId == null) {
throw new FlowableIllegalArgumentException("id is null");View on GitHub (pinned to d6d39ce1c6)
Solutions
- Pass a non-null like pattern, e.g. caseDefinitionNameLike("%order%").
- Only invoke caseDefinitionNameLike when the pattern is non-null/non-empty.
- If null means 'match all', omit the setter rather than passing null.
Example fix
// before
query.caseDefinitionNameLike(pattern); // pattern may be null
// after
if (pattern != null && !pattern.isEmpty()) {
query.caseDefinitionNameLike("%" + pattern + "%");
} Defensive patterns
Strategy: validation
Validate before calling
if (nameLike != null && !nameLike.isEmpty()) {
query.caseDefinitionNameLike(nameLike);
} Type guard
boolean hasPattern = nameLike != null && !nameLike.isEmpty();
Try / catch
try {
query.caseDefinitionNameLike(nameLike);
} catch (FlowableIllegalArgumentException e) {
// pattern was null — skip filter or use a default pattern
} Prevention
- Apply like-pattern filters only for non-empty user input.
- Decide explicitly what null/empty search input means (match-all vs match-none) and encode that before building the query.
When it happens
Trigger: Calling repositoryService.createCaseDefinitionQuery().caseDefinitionNameLike(null), typically when a search pattern variable is uninitialized.
Common situations: Search UIs where the user typed no pattern; code that builds "name LIKE ?" clauses from an optional input and forwards the null value.
Related errors
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/2869e8673168d3b2.
Report an issue: GitHub.