flowable/flowable-engine · error · FlowableIllegalArgumentException
categoryLike is null
Error message
categoryLike is null
What it means
Flowable's AppDefinitionQueryImpl validates every query criterion before storing it. Calling appDefinitionCategoryLike(null) throws FlowableIllegalArgumentException because a null 'like' pattern cannot be translated into a SQL LIKE clause. The check happens eagerly at query-building time, not at query execution.
Source
Thrown at modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/repository/AppDefinitionQueryImpl.java:95
throw new FlowableIllegalArgumentException("Empty appsDefinitionIds");
}
this.ids = appsDefinitionIds;
return this;
}
@Override
public AppDefinitionQueryImpl appDefinitionCategory(String category) {
if (category == null) {
throw new FlowableIllegalArgumentException("category is null");
}
this.category = category;
return this;
}
@Override
public AppDefinitionQueryImpl appDefinitionCategoryLike(String categoryLike) {
if (categoryLike == null) {
throw new FlowableIllegalArgumentException("categoryLike is null");
}
this.categoryLike = categoryLike;
return this;
}
@Override
public AppDefinitionQueryImpl appDefinitionCategoryNotEquals(String categoryNotEquals) {
if (categoryNotEquals == null) {
throw new FlowableIllegalArgumentException("categoryNotEquals is null");
}
this.categoryNotEquals = categoryNotEquals;
return this;
}
@Override
public AppDefinitionQueryImpl appDefinitionName(String name) {
if (name == null) {
throw new FlowableIllegalArgumentException("name is null");View on GitHub (pinned to d6d39ce1c6)
Solutions
- Check the value for null before calling appDefinitionCategoryLike, and only call it when non-null
- Default the value to a non-null pattern (e.g. "%") if a match-all is intended
- If a null means 'no filter', restructure to conditionally apply the criterion
- Catch FlowableIllegalArgumentException at the API boundary and return a 400 with the message
Example fix
// before
query.appDefinitionCategoryLike(categoryLike);
// after
if (categoryLike != null) {
query.appDefinitionCategoryLike(categoryLike);
} Defensive patterns
Strategy: validation
Validate before calling
if (categoryLike != null) {
query.appDefinitionCategoryLike(categoryLike);
} Type guard
boolean isApplicable(String v) { return v != null && !v.isEmpty(); } Try / catch
try {
query.appDefinitionCategoryLike(categoryLike);
} catch (FlowableIllegalArgumentException e) {
throw new ResponseStatusException(HttpStatus.BAD_REQUEST, e.getMessage(), e);
} Prevention
- Only call query-criteria methods when the filter value is non-null
- Normalize optional request parameters to Optional<String> and filter with ifPresent
- Never forward nullable DTO fields straight into Flowable query builders
When it happens
Trigger: Calling appDefinitionQuery.appDefinitionCategoryLike(categoryLike) with a null String, typically when the value comes from an unset/unbound variable, a missing request parameter, or a caller that builds criteria conditionally but passes the variable unconditionally.
Common situations: REST/API layers binding optional query params (categoryLike not supplied -> null); code refactored so a previously-defaulted value became nullable; dynamic query builders that always call every filter method.
Related errors
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/2ab418d78a65007e.
Report an issue: GitHub.