{"record":{"id":"22e9746f840583cd","repo":"flowable/flowable-engine","slug":"deploymenttenantidlike-is-null-22e974","errorCode":null,"errorMessage":"deploymentTenantIdLike is null","messagePattern":"deploymentTenantIdLike is null","errorType":"validation","errorClass":"ActivitiIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable5-engine/src/main/java/org/activiti/engine/impl/DeploymentQueryImpl.java","lineNumber":111,"sourceCode":"            throw new ActivitiIllegalArgumentException(\"deploymentCategoryExclude is null\");\n        }\n        this.categoryNotEquals = deploymentCategoryNotEquals;\n        return this;\n    }\n\n    @Override\n    public DeploymentQueryImpl deploymentTenantId(String tenantId) {\n        if (tenantId == null) {\n            throw new ActivitiIllegalArgumentException(\"deploymentTenantId is null\");\n        }\n        this.tenantId = tenantId;\n        return this;\n    }\n\n    @Override\n    public DeploymentQueryImpl deploymentTenantIdLike(String tenantIdLike) {\n        if (tenantIdLike == null) {\n            throw new ActivitiIllegalArgumentException(\"deploymentTenantIdLike is null\");\n        }\n        this.tenantIdLike = tenantIdLike;\n        return this;\n    }\n\n    @Override\n    public DeploymentQueryImpl deploymentWithoutTenantId() {\n        this.withoutTenantId = true;\n        return this;\n    }\n\n    @Override\n    public DeploymentQueryImpl processDefinitionKey(String key) {\n        if (key == null) {\n            throw new ActivitiIllegalArgumentException(\"key is null\");\n        }\n        this.processDefinitionKey = key;\n        return this;","sourceCodeStart":93,"sourceCodeEnd":129,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable5-engine/src/main/java/org/activiti/engine/impl/DeploymentQueryImpl.java#L93-L129","documentation":"DeploymentQueryImpl.deploymentTenantIdLike() throws ActivitiIllegalArgumentException when the tenantIdLike argument is null. The like-pattern for tenant filtering must be a non-null string; null cannot form a SQL LIKE predicate.","triggerScenarios":"Calling repositoryService.createDeploymentQuery().deploymentTenantIdLike(null), e.g. building a tenant prefix pattern from a nullable prefix variable.","commonSituations":"Tenant prefix searches (tenantIdLike(\"acme-%\")) where the prefix comes from config that is unset; dynamic query builders always invoking the filter method.","solutions":["Pass a non-null pattern string","Conditionally add the filter only when a pattern is provided","Default the prefix to an explicit sentinel value if wildcard semantics are wanted","Correct the config/input source that yields null"],"exampleFix":"// before\nquery.deploymentTenantIdLike(tenantPrefix + \"%\");\n// after\nif (tenantPrefix != null) {\n    query.deploymentTenantIdLike(tenantPrefix + \"%\");\n}","handlingStrategy":"validation","validationCode":"if (tenantIdLike == null) { throw new IllegalArgumentException(\"tenantIdLike must not be null\"); }\nrepositoryService.createDeploymentQuery().deploymentTenantIdLike(tenantIdLike)...","typeGuard":"boolean hasText(String s) { return s != null && !s.trim().isEmpty(); }","tryCatchPattern":"try {\n    repositoryService.createDeploymentQuery().deploymentTenantIdLike(pattern).list();\n} catch (ActivitiIllegalArgumentException e) {\n    log.error(\"tenantIdLike pattern was null\", e);\n}","preventionTips":["Build tenant patterns from validated non-null prefixes","Skip the filter when no pattern is configured","Null-check configuration before pattern concatenation"],"tags":["java","activiti","null-argument","multi-tenancy"],"backgroundTag":"null-argument","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}