flowable/flowable-engine · error · FlowableIllegalArgumentException

Provided emailLike is null

Error message

Provided emailLike is null

What it means

UserQueryImpl.userEmailLike(String) throws FlowableIllegalArgumentException when the emailLike pattern is null. The method builds a SQL LIKE pattern, and a null pattern is meaningless, so the engine rejects it up front. Supply a pattern such as "%@example.com" or drop the criterion.

Source

Thrown at modules/flowable-idm-engine/src/main/java/org/flowable/idm/engine/impl/UserQueryImpl.java:204

            throw new FlowableIllegalArgumentException("Provided display name is null");
        }
        this.displayNameLikeIgnoreCase = displayNameLikeIgnoreCase.toLowerCase();
        return this;
    }

    @Override
    public UserQuery userEmail(String email) {
        if (email == null) {
            throw new FlowableIllegalArgumentException("Provided email is null");
        }
        this.email = email;
        return this;
    }

    @Override
    public UserQuery userEmailLike(String emailLike) {
        if (emailLike == null) {
            throw new FlowableIllegalArgumentException("Provided emailLike is null");
        }
        this.emailLike = emailLike;
        return this;
    }

    @Override
    public UserQuery memberOfGroup(String groupId) {
        if (groupId == null) {
            throw new FlowableIllegalArgumentException("Provided groupId is null");
        }
        this.groupId = groupId;
        return this;
    }

    @Override
    public UserQuery memberOfGroups(List<String> groupIds) {
        if (groupIds == null) {
            throw new FlowableIllegalArgumentException("Provided groupIds is null");

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Pass a non-null LIKE pattern (e.g. "%" + search + "%") or omit the userEmailLike() call when null.
  2. Coerce empty input to null at the controller layer and only call userEmailLike() when a search term exists.

Example fix

// before
List<User> users = identityService.createUserQuery().userEmailLike(request.getTerm()).list();
// after
UserQuery q = identityService.createUserQuery();
String term = request.getTerm();
if (term != null && !term.isEmpty()) {
    q = q.userEmailLike("%" + term + "%");
}
List<User> users = q.list();
Defensive patterns

Strategy: validation

Validate before calling

if (emailLike != null && !emailLike.isBlank()) { query = query.userEmailLike(emailLike); }

Type guard

boolean hasSearchTerm(String s) { return s != null && !s.isBlank(); }

Try / catch

try { query.userEmailLike(term); } catch (FlowableIllegalArgumentException e) { log.warn("Null emailLike pattern ignored", e); }

Prevention

When it happens

Trigger: Calling identityService.createUserQuery().userEmailLike(null).

Common situations: Building a search screen where the user typed a wildcard search string that is empty/null and the code passes it through unconditionally.

Related errors


AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11). Data as JSON: /api/errors/87fe21a850c18cd6. Report an issue: GitHub.