flowable/flowable-engine · error · FlowableIllegalArgumentException

Provided ipAddressLike is null

Error message

Provided ipAddressLike is null

What it means

Flowable's TokenQueryImpl.ipAddressLike(String ipAddressLike) throws FlowableIllegalArgumentException when the argument is null. The LIKE-style IP pattern must be a non-null string (typically containing % wildcards) to form the SQL clause; validation happens in the fluent method itself.

Solutions

  1. Validate the pattern string before calling ipAddressLike and skip the filter when null
  2. Guard pattern construction: if (prefix != null) query.ipAddressLike(prefix + "%");
  3. Provide a configured default pattern or reject requests that omit a required filter

Example fix

// before
TokenQuery query = identityService.createTokenQuery().ipAddressLike(prefix + "%");
// after
TokenQuery query = identityService.createTokenQuery();
if (prefix != null) {
    query.ipAddressLike(prefix + "%");
}
Defensive patterns

Strategy: validation

Validate before calling

if (pattern == null) { throw new IllegalArgumentException("pattern must not be null before ipAddressLike()"); }

Type guard

boolean hasPattern(String pattern) { return pattern != null && !pattern.isEmpty(); }

Try / catch

try { query.ipAddressLike(pattern); } catch (FlowableIllegalArgumentException e) { log.warn("Invalid token query: {}", e.getMessage()); }

Prevention

When it happens

Trigger: Calling ipAddressLike(null) on a TokenQuery, e.g. building a pattern like prefix + "%" where prefix was null, or passing an optional subnet filter straight from configuration.

Common situations: Searching tokens by IP prefix/subnet where the prefix comes from an unset config key or optional request parameter; pattern-building code that assumed a non-null base string.

Related errors


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

Appendix: source

Thrown at modules/flowable-idm-engine/src/main/java/org/flowable/idm/engine/impl/TokenQueryImpl.java:128

            throw new FlowableIllegalArgumentException("Provided tokenDateAfter is null");
        }
        this.tokenDateAfter = tokenDateAfter;
        return this;
    }

    @Override
    public TokenQuery ipAddress(String ipAddress) {
        if (ipAddress == null) {
            throw new FlowableIllegalArgumentException("Provided ip address is null");
        }
        this.ipAddress = ipAddress;
        return this;
    }

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

    @Override
    public TokenQuery userAgent(String userAgent) {
        if (userAgent == null) {
            throw new FlowableIllegalArgumentException("Provided user agent is null");
        }
        this.userAgent = userAgent;
        return this;
    }

    @Override
    public TokenQuery userAgentLike(String userAgentLike) {
        if (userAgentLike == null) {
            throw new FlowableIllegalArgumentException("Provided userAgentLike is null");

View on GitHub (pinned to d6d39ce1c6)