flowable/flowable-engine · error · FlowableIllegalArgumentException
Provided ip address is null
Error message
Provided ip address is null
What it means
Flowable's TokenQueryImpl.ipAddress(String ipAddress) throws FlowableIllegalArgumentException when the ipAddress argument is null. The IP criterion must be a concrete string to be bound as a query parameter; it is validated eagerly in the fluent method.
Solutions
- Capture the IP reliably (resolve X-Forwarded-For with a fallback to remote address) before querying
- Apply the filter only when a non-null IP is available
- Skip the criterion to query without IP filtering, or reject the request when the IP is required
Example fix
// before
TokenQuery query = identityService.createTokenQuery().ipAddress(clientIp);
// after
TokenQuery query = identityService.createTokenQuery();
if (clientIp != null) {
query.ipAddress(clientIp);
} Defensive patterns
Strategy: validation
Validate before calling
if (clientIp == null) { throw new IllegalArgumentException("clientIp must not be null before ipAddress()"); } Type guard
boolean hasIp(String ip) { return ip != null && !ip.isEmpty(); } Try / catch
try { query.ipAddress(ip); } catch (FlowableIllegalArgumentException e) { log.warn("Invalid token query: {}", e.getMessage()); } Prevention
- Resolve client IP with fallbacks (X-Forwarded-For, then remote address)
- Only apply IP filters when the IP was actually captured
- Handle proxy setups explicitly so IP extraction never silently returns null
When it happens
Trigger: Calling ipAddress(null) on a TokenQuery, usually when the client IP was not captured (e.g. request.getRemoteAddr() on a proxy-mangled request) or forwarded-header parsing returned null.
Common situations: Audit lookups of tokens by originating IP behind reverse proxies where X-Forwarded-For parsing fails; request-scoped values lost outside the web thread; optional filters applied blindly.
Related errors
- Provided id is null
- Provided ids is null
- Provided ipAddressLike is null
- Provided token date is null
- Provided token value is null
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/9853039f46742124.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-idm-engine/src/main/java/org/flowable/idm/engine/impl/TokenQueryImpl.java:119
throw new FlowableIllegalArgumentException("Provided tokenDateBefore is null");
}
this.tokenDateBefore = tokenDateBefore;
return this;
}
@Override
public TokenQuery tokenDateAfter(Date tokenDateAfter) {
if (tokenDateAfter == null) {
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");View on GitHub (pinned to d6d39ce1c6)