{"record":{"id":"fb4d67380aff042f","repo":"flowable/flowable-engine","slug":"deploymentcategorylike-is-null","errorCode":null,"errorMessage":"deploymentCategoryLike is null","messagePattern":"deploymentCategoryLike is null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine/src/main/java/org/flowable/engine/impl/DeploymentQueryImpl.java","lineNumber":114,"sourceCode":"            throw new FlowableIllegalArgumentException(\"deploymentNameLike is null\");\n        }\n        this.nameLike = nameLike;\n        return this;\n    }\n\n    @Override\n    public DeploymentQueryImpl deploymentCategory(String deploymentCategory) {\n        if (deploymentCategory == null) {\n            throw new FlowableIllegalArgumentException(\"deploymentCategory is null\");\n        }\n        this.category = deploymentCategory;\n        return this;\n    }\n\n    @Override\n    public DeploymentQueryImpl deploymentCategoryLike(String categoryLike) {\n        if (categoryLike == null) {\n            throw new FlowableIllegalArgumentException(\"deploymentCategoryLike is null\");\n        }\n        this.categoryLike = categoryLike;\n        return this;\n    }\n\n    @Override\n    public DeploymentQueryImpl deploymentCategoryNotEquals(String deploymentCategoryNotEquals) {\n        if (deploymentCategoryNotEquals == null) {\n            throw new FlowableIllegalArgumentException(\"deploymentCategoryExclude is null\");\n        }\n        this.categoryNotEquals = deploymentCategoryNotEquals;\n        return this;\n    }\n\n    @Override\n    public DeploymentQueryImpl deploymentKey(String deploymentKey) {\n        if (deploymentKey == null) {\n            throw new FlowableIllegalArgumentException(\"deploymentKey is null\");","sourceCodeStart":96,"sourceCodeEnd":132,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine/src/main/java/org/flowable/engine/impl/DeploymentQueryImpl.java#L96-L132","documentation":"DeploymentQueryImpl.deploymentCategoryLike(String) throws FlowableIllegalArgumentException when the categoryLike argument is null. The filter is a SQL LIKE on the deployment category column; Flowable validates the argument at the builder call so a null never reaches the query execution.","triggerScenarios":"repositoryService.createDeploymentQuery().deploymentCategoryLike(null), e.g. when a wildcard category pattern comes from a null config value or unset request parameter.","commonSituations":"Category-based tenant/environment filtering where the pattern template was not filled in; copying query code and forgetting to supply the pattern.","solutions":["Pass a non-null LIKE pattern such as \"%myCategory%\".","Guard: if (categoryLike != null) query.deploymentCategoryLike(categoryLike).","Omit the filter when no category pattern is available."],"exampleFix":"// before\nquery.deploymentCategoryLike(categoryPattern);\n// after\nif (categoryPattern != null) {\n    query.deploymentCategoryLike(categoryPattern);\n}","handlingStrategy":"validation","validationCode":"if (categoryPattern != null) {\n    query.deploymentCategoryLike(categoryPattern);\n}","typeGuard":"boolean hasCategoryPattern(String pattern) { return pattern != null && !pattern.isEmpty(); }","tryCatchPattern":"try {\n    query.deploymentCategoryLike(categoryLike);\n} catch (FlowableIllegalArgumentException e) {\n    log.warn(\"Null categoryLike filter ignored\", e);\n}","preventionTips":["Default null patterns to an omitted filter","Build LIKE patterns in one utility to avoid inconsistent null handling","Validate config templates that generate category patterns"],"tags":["flowable","query-builder","null-argument","like-filter"],"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"}