flowable/flowable-engine · error · FlowableIllegalArgumentException
nameLike is null
Error message
nameLike is null
What it means
appDefinitionNameLike(null) throws FlowableIllegalArgumentException since a null cannot form a LIKE pattern against the app definition name column. Validation is performed immediately in the query builder.
Source
Thrown at modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/repository/AppDefinitionQueryImpl.java:122
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");
}
this.name = name;
return this;
}
@Override
public AppDefinitionQueryImpl appDefinitionNameLike(String nameLike) {
if (nameLike == null) {
throw new FlowableIllegalArgumentException("nameLike is null");
}
this.nameLike = nameLike;
return this;
}
@Override
public AppDefinitionQueryImpl deploymentId(String deploymentId) {
if (deploymentId == null) {
throw new FlowableIllegalArgumentException("id is null");
}
this.deploymentId = deploymentId;
return this;
}
@Override
public AppDefinitionQueryImpl deploymentIds(Set<String> deploymentIds) {
if (deploymentIds == null) {
throw new FlowableIllegalArgumentException("ids are null");View on GitHub (pinned to d6d39ce1c6)
Solutions
- Null-check before calling; skip the criterion when absent
- Normalize empty strings and null to 'no filter' in your input layer
- Handle FlowableIllegalArgumentException and return a 400 to the caller
Example fix
// before
query.appDefinitionNameLike("%" + nameLike + "%");
// after
if (nameLike != null && !nameLike.isEmpty()) {
query.appDefinitionNameLike("%" + nameLike + "%");
} Defensive patterns
Strategy: validation
Validate before calling
if (nameLike != null && !nameLike.isEmpty()) {
query.appDefinitionNameLike(nameLike);
} Type guard
boolean isApplicable(String v) { return v != null && !v.isEmpty(); } Try / catch
try {
query.appDefinitionNameLike(nameLike);
} catch (FlowableIllegalArgumentException e) {
throw new ResponseStatusException(HttpStatus.BAD_REQUEST, e.getMessage(), e);
} Prevention
- Treat empty and null search input as 'no filter' and skip the call
- Build wildcard patterns only after null-checking the base value
- Centralize query building in one helper that guards all optional criteria
When it happens
Trigger: Calling appDefinitionNameLike(nameLike) with null, typically when the search term comes from an optional request parameter or a nullable field of a search-criteria object.
Common situations: Empty search box bound as null instead of skipped; API clients omitting the nameLike query parameter; code that concatenates wildcards onto a possibly-null base value.
Related errors
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/cd6f03b5f9ffb778.
Report an issue: GitHub.