flowable/flowable-engine · error · FlowableIllegalArgumentException

categoryNotEquals is null

Error message

categoryNotEquals is null

What it means

AppDefinitionQueryImpl.appDefinitionCategoryNotEquals rejects a null argument with FlowableIllegalArgumentException. A null exclusion criterion is indistinguishable from a caller mistake, so the library fails fast instead of silently building a wrong or broken query.

Source

Thrown at modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/repository/AppDefinitionQueryImpl.java:104

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

    @Override
    public AppDefinitionQueryImpl appDefinitionCategoryLike(String categoryLike) {
        if (categoryLike == null) {
            throw new FlowableIllegalArgumentException("categoryLike is null");
        }
        this.categoryLike = categoryLike;
        return this;
    }

    @Override
    public AppDefinitionQueryImpl appDefinitionCategoryNotEquals(String categoryNotEquals) {
        if (categoryNotEquals == null) {
            throw new FlowableIllegalArgumentException("categoryNotEquals is null");
        }
        this.categoryNotEquals = categoryNotEquals;
        return this;
    }

    @Override
    public AppDefinitionQueryImpl appDefinitionName(String name) {
        if (name == null) {
            throw new FlowableIllegalArgumentException("name is null");
        }
        this.name = name;
        return this;
    }

    @Override
    public AppDefinitionQueryImpl appDefinitionNameLike(String nameLike) {
        if (nameLike == null) {
            throw new FlowableIllegalArgumentException("nameLike is null");

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Null-check the value and call appDefinitionCategoryNotEquals only when non-null
  2. Use a sentinel non-null value if 'exclude nothing' must be expressed
  3. Capture FlowableIllegalArgumentException and map it to a client-error response

Example fix

// before
query.appDefinitionCategoryNotEquals(excludedCategory);
// after
if (excludedCategory != null) {
    query.appDefinitionCategoryNotEquals(excludedCategory);
}
Defensive patterns

Strategy: validation

Validate before calling

if (categoryNotEquals != null) {
    query.appDefinitionCategoryNotEquals(categoryNotEquals);
}

Type guard

boolean isApplicable(String v) { return v != null && !v.isEmpty(); }

Try / catch

try {
    query.appDefinitionCategoryNotEquals(categoryNotEquals);
} catch (FlowableIllegalArgumentException e) {
    throw new ResponseStatusException(HttpStatus.BAD_REQUEST, e.getMessage(), e);
}

Prevention

When it happens

Trigger: Calling appDefinitionCategoryNotEquals(null), e.g. when the excluded category is read from config/request input that is absent, or a caller builds the exclusion unconditionally from a nullable variable.

Common situations: Optional REST filter for 'exclude category X' left unset; configuration key missing so the variable is null; null returned from a lookup used directly as the filter value.

Related errors


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