flowable/flowable-engine · error · ActivitiIllegalArgumentException
deploymentName is null
Error message
deploymentName is null
What it means
DeploymentQueryImpl.deploymentName() throws ActivitiIllegalArgumentException when the deploymentName argument is null. The query API requires an actual name value to build the WHERE clause; null is not treated as 'no filter'. Pass an empty filter chain instead by not calling the method.
Source
Thrown at modules/flowable5-engine/src/main/java/org/activiti/engine/impl/DeploymentQueryImpl.java:66
}
public DeploymentQueryImpl(CommandExecutor commandExecutor) {
super(commandExecutor);
}
@Override
public DeploymentQueryImpl deploymentId(String deploymentId) {
if (deploymentId == null) {
throw new ActivitiIllegalArgumentException("Deployment id is null");
}
this.deploymentId = deploymentId;
return this;
}
@Override
public DeploymentQueryImpl deploymentName(String deploymentName) {
if (deploymentName == null) {
throw new ActivitiIllegalArgumentException("deploymentName is null");
}
this.name = deploymentName;
return this;
}
@Override
public DeploymentQueryImpl deploymentNameLike(String nameLike) {
if (nameLike == null) {
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");View on GitHub (pinned to d6d39ce1c6)
Solutions
- Pass a non-null name to deploymentName()
- Guard with a null check and only add the filter when a name is present
- Verify the variable holding the name is populated before querying
- Use deploymentNameLike() with a non-null pattern if partial matching is intended (also must be non-null)
Example fix
// before
Deployment d = repositoryService.createDeploymentQuery().deploymentName(name).singleResult();
// after
if (name == null) {
throw new IllegalArgumentException("deploymentName must be provided");
}
Deployment d = repositoryService.createDeploymentQuery().deploymentName(name).singleResult(); Defensive patterns
Strategy: validation
Validate before calling
if (deploymentName == null) { throw new IllegalArgumentException("deploymentName must not be null"); }
repositoryService.createDeploymentQuery().deploymentName(deploymentName)... Type guard
boolean hasText(String s) { return s != null && !s.trim().isEmpty(); } Try / catch
try {
repositoryService.createDeploymentQuery().deploymentName(name).list();
} catch (ActivitiIllegalArgumentException e) {
log.error("deploymentName was null", e);
} Prevention
- Validate search inputs before building queries
- Only add optional filters when the value is present
- Document that query filter methods reject null
When it happens
Trigger: Calling repositoryService.createDeploymentQuery().deploymentName(null), usually when the name originates from a nullable variable, config value, or optional user input.
Common situations: Search forms where the name field is optional; code copied from examples with a hardcoded string later replaced by a nullable parameter; bean property defaults of null.
Related errors
- Deployment id is null
- deploymentNameLike is null
- deploymentCategory is null
- deploymentCategoryExclude is null
- key is null
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/b1802e43caa01531.
Report an issue: GitHub.