{"record":{"id":"14c78f7d7c12a456","repo":"flowable/flowable-engine","slug":"resourcename-is-null-14c78f","errorCode":null,"errorMessage":"resourceName is null","messagePattern":"resourceName is null","errorType":"validation","errorClass":"ActivitiIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable5-engine/src/main/java/org/activiti/engine/impl/ProcessDefinitionQueryImpl.java","lineNumber":177,"sourceCode":"            throw new ActivitiIllegalArgumentException(\"key is null\");\n        }\n        this.key = key;\n        return this;\n    }\n\n    @Override\n    public ProcessDefinitionQueryImpl processDefinitionKeyLike(String keyLike) {\n        if (keyLike == null) {\n            throw new ActivitiIllegalArgumentException(\"keyLike is null\");\n        }\n        this.keyLike = keyLike;\n        return this;\n    }\n\n    @Override\n    public ProcessDefinitionQueryImpl processDefinitionResourceName(String resourceName) {\n        if (resourceName == null) {\n            throw new ActivitiIllegalArgumentException(\"resourceName is null\");\n        }\n        this.resourceName = resourceName;\n        return this;\n    }\n\n    @Override\n    public ProcessDefinitionQueryImpl processDefinitionResourceNameLike(String resourceNameLike) {\n        if (resourceNameLike == null) {\n            throw new ActivitiIllegalArgumentException(\"resourceNameLike is null\");\n        }\n        this.resourceNameLike = resourceNameLike;\n        return this;\n    }\n\n    @Override\n    public ProcessDefinitionQueryImpl processDefinitionVersion(Integer version) {\n        checkVersion(version);\n        this.version = version;","sourceCodeStart":159,"sourceCodeEnd":195,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable5-engine/src/main/java/org/activiti/engine/impl/ProcessDefinitionQueryImpl.java#L159-L195","documentation":"ProcessDefinitionQueryImpl.processDefinitionResourceName(String) throws ActivitiIllegalArgumentException 'resourceName is null' when the resource name argument is null. The resource name is the exact path of the deployment resource (e.g. 'processes/order.bpmn20.xml'), and the query builder requires a non-null value to build an equality filter. Null is rejected eagerly.","triggerScenarios":"Calling ProcessDefinitionQuery.processDefinitionResourceName(null), usually when the resource name is derived from a variable, config entry, or lookup result that is null.","commonSituations":"Code locating definitions by deployed resource path where the path convention changed between environments; refactored constants; deserialized request bodies missing the resource field.","solutions":["Pass the exact deployed resource name/path, e.g. \"processes/myProcess.bpmn20.xml\"","Check the repository deployment resources (DeploymentQuery / repository resource listing) to confirm the correct name","Make the filter conditional when the resource name is optional","Catch ActivitiIllegalArgumentException and surface a validation error"],"exampleFix":"// before\nquery.processDefinitionResourceName(config.getResourcePath()); // null if unset\n// after\nif (config.getResourcePath() != null) {\n    query.processDefinitionResourceName(config.getResourcePath());\n}","handlingStrategy":"validation","validationCode":"if (resourceName == null) throw new IllegalArgumentException(\"resourceName is required\");\nquery.processDefinitionResourceName(resourceName);","typeGuard":"boolean isNonBlank(String s) { return s != null && !s.trim().isEmpty(); }","tryCatchPattern":"try {\n    query.processDefinitionResourceName(resourceName);\n} catch (ActivitiIllegalArgumentException e) {\n    if (e.getMessage().contains(\"resourceName is null\")) {\n        throw new BadRequestException(\"resource name must not be null\");\n    }\n    throw e;\n}","preventionTips":["Confirm exact deployed resource names via deployment resource listing before filtering","Keep resource path conventions in shared constants, not per-environment literals","Null-check config-derived values before applying filters","Prefer key/name filters over resource-name filters when the resource path is uncertain"],"tags":["java","null-argument","query-builder","activiti","validation"],"backgroundTag":"null-argument","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}