flowable/flowable-engine · error · FlowableIllegalArgumentException
keyLike is null
Error message
keyLike is null
What it means
Fluent-query guard in AppDefinitionQueryImpl.appDefinitionKeyLike: the like-pattern for the app definition key is null, which would otherwise produce a SQL fragment comparing against NULL and silently wrong results.
Source
Thrown at modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/repository/AppDefinitionQueryImpl.java:160
throw new FlowableIllegalArgumentException("ids is an empty collection");
}
this.deploymentIds = deploymentIds;
return this;
}
@Override
public AppDefinitionQueryImpl appDefinitionKey(String key) {
if (key == null) {
throw new FlowableIllegalArgumentException("key is null");
}
this.key = key;
return this;
}
@Override
public AppDefinitionQueryImpl appDefinitionKeyLike(String keyLike) {
if (keyLike == null) {
throw new FlowableIllegalArgumentException("keyLike is null");
}
this.keyLike = keyLike;
return this;
}
@Override
public AppDefinitionQueryImpl appDefinitionResourceName(String resourceName) {
if (resourceName == null) {
throw new FlowableIllegalArgumentException("resourceName is null");
}
this.resourceName = resourceName;
return this;
}
@Override
public AppDefinitionQueryImpl appDefinitionResourceNameLike(String resourceNameLike) {
if (resourceNameLike == null) {
throw new FlowableIllegalArgumentException("resourceNameLike is null");View on GitHub (pinned to d6d39ce1c6)
Solutions
- Null-check the pattern; append wildcards only after confirming the base value is non-null
- Treat null/empty input as 'no key filter' and skip the call
- Catch FlowableIllegalArgumentException at the API layer and return 400
Example fix
// before
query.appDefinitionKeyLike(keyLike + "%");
// after
if (keyLike != null) {
query.appDefinitionKeyLike(keyLike + "%");
} Defensive patterns
Strategy: validation
Validate before calling
if (keyLike != null && !keyLike.isEmpty()) {
query.appDefinitionKeyLike(keyLike);
} Type guard
boolean isApplicable(String v) { return v != null && !v.isEmpty(); } Try / catch
try {
query.appDefinitionKeyLike(keyLike);
} catch (FlowableIllegalArgumentException e) {
throw new ResponseStatusException(HttpStatus.BAD_REQUEST, e.getMessage(), e);
} Prevention
- Skip like-criteria when the search term is null or blank
- Build patterns (term + "%") only after null-checking the term
- Keep optional-filter guards in one reusable query-builder helper
When it happens
Trigger: Calling appDefinitionKeyLike(keyLike) with null — usually an optional search term from a request that was not supplied, or a computed pattern (key + "%") where the base key is null.
Common situations: Search UI with an empty key field bound as null; dynamic query builders that always invoke every filter method; pattern built from a nullable configuration value.
Related errors
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/6693ef0be24c2d6e.
Report an issue: GitHub.