flowable/flowable-engine · error · FlowableIllegalArgumentException
deploymentCategory is null
Error message
deploymentCategory is null
What it means
EventDeploymentQueryImpl.deploymentCategory sets an exact category filter on the deployment query. It throws FlowableIllegalArgumentException when deploymentCategory is null because null is not a valid filter value for the SQL query.
Solutions
- Pass the exact category assigned at deployment time (EventDeploymentBuilder.category(...))
- Omit the category filter when the category is unknown
- Null-check or default the category variable before building the query
Example fix
// before
query.deploymentCategory(category); // may be null
// after
if (category != null) {
query.deploymentCategory(category);
} Defensive patterns
Strategy: validation
Validate before calling
if (category == null || category.isEmpty()) { throw new IllegalArgumentException("category required for deploymentCategory()"); } Type guard
boolean hasText(String s) { return s != null && !s.trim().isEmpty(); } Try / catch
try { q.deploymentCategory(category).list(); } catch (FlowableIllegalArgumentException e) { log.warn("category null, skipping filter"); } Prevention
- Assign categories explicitly with EventDeploymentBuilder.category(...) at deploy time
- Null-check lookups that supply the category value
- Omit the filter when the category is unknown rather than passing null
When it happens
Trigger: Calling deploymentCategory(null), typically when the category value comes from an optional descriptor, config entry, or map lookup that is absent.
Common situations: Category metadata not configured at deploy time (EventDeploymentBuilder.category not called), config key missing, passing a lookup result straight through without null-checking.
Related errors
- Deployment id is null
- Deployment id is null
- deploymentCategoryExclude is null
- deploymentName is null
- deploymentNameLike is null
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/76ae79dcd659d55c.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/EventDeploymentQueryImpl.java:90
throw new FlowableIllegalArgumentException("deploymentName is null");
}
this.name = deploymentName;
return this;
}
@Override
public EventDeploymentQueryImpl deploymentNameLike(String nameLike) {
if (nameLike == null) {
throw new FlowableIllegalArgumentException("deploymentNameLike is null");
}
this.nameLike = nameLike;
return this;
}
@Override
public EventDeploymentQueryImpl deploymentCategory(String deploymentCategory) {
if (deploymentCategory == null) {
throw new FlowableIllegalArgumentException("deploymentCategory is null");
}
this.category = deploymentCategory;
return this;
}
@Override
public EventDeploymentQueryImpl deploymentCategoryNotEquals(String deploymentCategoryNotEquals) {
if (deploymentCategoryNotEquals == null) {
throw new FlowableIllegalArgumentException("deploymentCategoryExclude is null");
}
this.categoryNotEquals = deploymentCategoryNotEquals;
return this;
}
@Override
public EventDeploymentQueryImpl parentDeploymentId(String parentDeploymentId) {
if (parentDeploymentId == null) {
throw new FlowableIllegalArgumentException("parentDeploymentId is null");View on GitHub (pinned to d6d39ce1c6)