flowable/flowable-engine · error · ActivitiIllegalArgumentException

deploymentCategoryExclude is null

Error message

deploymentCategoryExclude is null

What it means

DeploymentQueryImpl.deploymentCategoryNotEquals() throws ActivitiIllegalArgumentException when its argument is null. The exclusion filter must be a concrete category value; null cannot be turned into a 'not equals' predicate.

Source

Thrown at modules/flowable5-engine/src/main/java/org/activiti/engine/impl/DeploymentQueryImpl.java:93

            throw new ActivitiIllegalArgumentException("deploymentNameLike is null");
        }
        this.nameLike = nameLike;
        return this;
    }

    @Override
    public DeploymentQueryImpl deploymentCategory(String deploymentCategory) {
        if (deploymentCategory == null) {
            throw new ActivitiIllegalArgumentException("deploymentCategory is null");
        }
        this.category = deploymentCategory;
        return this;
    }

    @Override
    public DeploymentQueryImpl deploymentCategoryNotEquals(String deploymentCategoryNotEquals) {
        if (deploymentCategoryNotEquals == null) {
            throw new ActivitiIllegalArgumentException("deploymentCategoryExclude is null");
        }
        this.categoryNotEquals = deploymentCategoryNotEquals;
        return this;
    }

    @Override
    public DeploymentQueryImpl deploymentTenantId(String tenantId) {
        if (tenantId == null) {
            throw new ActivitiIllegalArgumentException("deploymentTenantId is null");
        }
        this.tenantId = tenantId;
        return this;
    }

    @Override
    public DeploymentQueryImpl deploymentTenantIdLike(String tenantIdLike) {
        if (tenantIdLike == null) {
            throw new ActivitiIllegalArgumentException("deploymentTenantIdLike is null");

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Pass a non-null category to exclude
  2. Only apply the exclusion when the value is present
  3. Define the excluded category as a constant/default so it is never null
  4. If you truly want all deployments, omit the call entirely

Example fix

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

Strategy: validation

Validate before calling

if (excludedCategory == null) { throw new IllegalArgumentException("excludedCategory must not be null"); }
repositoryService.createDeploymentQuery().deploymentCategoryNotEquals(excludedCategory)...

Type guard

boolean hasText(String s) { return s != null && !s.trim().isEmpty(); }

Try / catch

try {
    repositoryService.createDeploymentQuery().deploymentCategoryNotEquals(excluded).list();
} catch (ActivitiIllegalArgumentException e) {
    log.error("exclusion category was null", e);
}

Prevention

When it happens

Trigger: Calling repositoryService.createDeploymentQuery().deploymentCategoryNotEquals(null), e.g. an exclusion list built from config or user input where the excluded category is missing.

Common situations: Excluding internal/system categories where the exclusion constant is not defined; passing an unset property through; copy-paste code where the excluded value was removed.

Related errors


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