flowable/flowable-engine · error · FlowableIllegalArgumentException
Provided categoryLike is null
Error message
Provided categoryLike is null
What it means
Flowable's TimerJobQueryImpl.categoryLike(String) throws FlowableIllegalArgumentException when the categoryLike pattern is null. categoryLike performs SQL LIKE-style matching and requires an actual pattern string; null is rejected at query construction. An empty pattern is accepted, though it rarely matches anything useful.
Solutions
- Skip the categoryLike call when the pattern is null/blank instead of passing null
- Sanitize and default the pattern (e.g. "%" + input + "%") only when input is present
- Null-check in your query-builder wrapper before delegating to the Flowable query
- Catch FlowableIllegalArgumentException and treat as invalid search criteria
Example fix
// before
query.categoryLike("%" + searchInput + "%");
// after
if (searchInput != null && !searchInput.isEmpty()) {
query.categoryLike("%" + searchInput + "%");
} Defensive patterns
Strategy: validation
Validate before calling
if (categoryPattern != null && !categoryPattern.isEmpty()) { query.categoryLike("%" + categoryPattern + "%"); } Type guard
boolean hasLikePattern(String p) { return p != null && !p.isEmpty(); } Try / catch
try { query.categoryLike(pattern); } catch (FlowableIllegalArgumentException e) { log.warn("Null categoryLike pattern", e); } Prevention
- Default blank search inputs to no-filter rather than null patterns
- Sanitize LIKE wildcards from user input
- Centralize query-building so null filters are skipped consistently
- Document that null never means 'match all' in Flowable queries
When it happens
Trigger: Calling createTimerJobQuery().categoryLike(null), typically when the pattern is built from an optional search input or an expression that evaluated to null.
Common situations: REST/GraphQL search endpoints where the user left the category filter blank; templated query builders that pass through null; mistaken assumption that null means 'no filter'.
Related errors
- Business key is null
- Business status is null
- Case definition category is null
- Case definition id is null
- Case definition ids is null
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/d37096a907e9d42c.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-job-service/src/main/java/org/flowable/job/service/impl/TimerJobQueryImpl.java:186
}
@Override
public TimerJobQueryImpl category(String category) {
if (category == null) {
throw new FlowableIllegalArgumentException("Provided category is null");
}
if (inOrStatement) {
this.currentOrQueryObject.category = category;
} else {
this.category = category;
}
return this;
}
@Override
public TimerJobQueryImpl categoryLike(String categoryLike) {
if (categoryLike == null) {
throw new FlowableIllegalArgumentException("Provided categoryLike is null");
}
if (inOrStatement) {
this.currentOrQueryObject.categoryLike = categoryLike;
} else {
this.categoryLike = categoryLike;
}
return this;
}
@Override
public TimerJobQueryImpl elementId(String elementId) {
if (elementId == null) {
throw new FlowableIllegalArgumentException("Provided element id is null");
}
if (inOrStatement) {
this.currentOrQueryObject.elementId = elementId;
} else {
this.elementId = elementId;View on GitHub (pinned to d6d39ce1c6)