flowable/flowable-engine · error · FlowableIllegalArgumentException

Provided date is null

Error message

Provided date is null

What it means

DeadLetterJobQueryImpl.duedateHigherThan(Date) requires a non-null date because the value is used directly as a comparison bound in the query. Passing null cannot be interpreted as a meaningful filter, so FlowableIllegalArgumentException is thrown immediately. Null filtering semantics must be expressed by simply not calling the method.

Source

Thrown at modules/flowable-job-service/src/main/java/org/flowable/job/service/impl/DeadLetterJobQueryImpl.java:483

        }

        if (onlyTimers) {
            throw new FlowableIllegalArgumentException("Cannot combine onlyTimers() with onlyExternalWorkers() in the same query");
        }

        if (inOrStatement) {
            this.currentOrQueryObject.onlyExternalWorkers = true;
        } else {
            this.onlyExternalWorkers = true;
        }
        return this;
    }


    @Override
    public DeadLetterJobQueryImpl duedateHigherThan(Date date) {
        if (date == null) {
            throw new FlowableIllegalArgumentException("Provided date is null");
        }
        if (inOrStatement) {
            this.currentOrQueryObject.duedateHigherThan = date;
        } else {
            this.duedateHigherThan = date;
        }
        return this;
    }

    @Override
    public DeadLetterJobQueryImpl duedateLowerThan(Date date) {
        if (date == null) {
            throw new FlowableIllegalArgumentException("Provided date is null");
        }
        if (inOrStatement) {
            this.currentOrQueryObject.duedateLowerThan = date;
        } else {
            this.duedateLowerThan = date;

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Ensure the date is non-null before calling duedateHigherThan, or skip the filter when null
  2. Default the date to a meaningful bound (e.g. new Date(0)) if a bound is always required
  3. Validate/parse the source value earlier and fail with a clearer message

Example fix

// before
query.duedateHigherThan(config.getDueAfter()); // NPE risk / throws if null
// after
if (config.getDueAfter() != null) {
    query.duedateHigherThan(config.getDueAfter());
}
Defensive patterns

Strategy: validation

Validate before calling

if (dueAfter != null) { query.duedateHigherThan(dueAfter); }

Type guard

boolean hasDueAfter(Date d) { return d != null; }

Try / catch

try { query.duedateHigherThan(dueAfter); } catch (FlowableIllegalArgumentException e) { log.warn("Null due date ignored", e); }

Prevention

When it happens

Trigger: Calling deadLetterJobQuery().duedateHigherThan(someDate) where someDate is null (often a variable from config, parsing, or an API payload that was null).

Common situations: A nullable deadline/timestamp parsed from JSON or a database column ends up null; configuration property not set and passed straight into the query.

Related errors


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