flowable/flowable-engine · error · FlowableIllegalArgumentException

Provided email is null

Error message

Provided email is null

What it means

UserQueryImpl.userEmail(String) throws FlowableIllegalArgumentException when the email filter argument is null. The Flowable idm-engine validates query criteria eagerly so that null filters never reach the database layer as ambiguous predicates. Pass a concrete email string or omit the call entirely.

Source

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

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

    @Override
    public UserQuery userDisplayNameLikeIgnoreCase(String displayNameLikeIgnoreCase) {
        if (displayNameLikeIgnoreCase == null) {
            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");

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Pass a non-null email string to userEmail(), or skip calling userEmail() when the value is null.
  2. Guard the call: if (email != null) query = query.userEmail(email);
  3. If an approximate match is intended, use userEmailLike() with a non-null pattern instead.

Example fix

// before
UserQuery q = identityService.createUserQuery().userEmail(user.getEmail());
// after
UserQuery q = identityService.createUserQuery();
if (user.getEmail() != null) {
    q = q.userEmail(user.getEmail());
}
Defensive patterns

Strategy: validation

Validate before calling

if (email != null && !email.isBlank()) { query = query.userEmail(email); }

Type guard

boolean hasEmail(String e) { return e != null && !e.isBlank(); }

Try / catch

try { query.userEmail(email); } catch (FlowableIllegalArgumentException e) { log.warn("Null email filter ignored", e); }

Prevention

When it happens

Trigger: Calling identityService.createUserQuery().userEmail(null) — the argument is null at the point the query criterion is set.

Common situations: Passing a user.email field that was never populated (e.g. an optional profile field from a form or external identity store); mapping a nullable request parameter straight into the query builder.

Related errors


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