{"record":{"id":"512f6be32fe1608e","repo":"flowable/flowable-engine","slug":"resourcename-is-null-512f6b","errorCode":null,"errorMessage":"resourceName is null","messagePattern":"resourceName is null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/EventDefinitionQueryImpl.java","lineNumber":243,"sourceCode":"\n    protected void checkVersion(Integer version) {\n        if (version == null) {\n            throw new FlowableIllegalArgumentException(\"version is null\");\n        } else if (version <= 0) {\n            throw new FlowableIllegalArgumentException(\"version must be positive\");\n        }\n    }\n\n    @Override\n    public EventDefinitionQueryImpl latestVersion() {\n        this.latest = true;\n        return this;\n    }\n\n    @Override\n    public EventDefinitionQueryImpl eventDefinitionResourceName(String resourceName) {\n        if (resourceName == null) {\n            throw new FlowableIllegalArgumentException(\"resourceName is null\");\n        }\n        this.resourceName = resourceName;\n        return this;\n    }\n\n    @Override\n    public EventDefinitionQueryImpl eventDefinitionResourceNameLike(String resourceNameLike) {\n        if (resourceNameLike == null) {\n            throw new FlowableIllegalArgumentException(\"resourceNameLike is null\");\n        }\n        this.resourceNameLike = resourceNameLike;\n        return this;\n    }\n\n    @Override\n    public EventDefinitionQueryImpl tenantId(String tenantId) {\n        if (tenantId == null) {\n            throw new FlowableIllegalArgumentException(\"form tenantId is null\");","sourceCodeStart":225,"sourceCodeEnd":261,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/EventDefinitionQueryImpl.java#L225-L261","documentation":"EventDefinitionQueryImpl.eventDefinitionResourceName sets an exact-match filter on the resource name (.event/.json file) of event definitions. It throws FlowableIllegalArgumentException when the resourceName argument is null because a null exact-match filter cannot be represented in the query.","triggerScenarios":"Calling eventDefinitionResourceName(null), typically when the resource name variable comes from an unset config value or an optional map lookup.","commonSituations":"Config key for the resource file not set, model object missing its resourceName field, refactoring where a default resource name was removed.","solutions":["Pass a non-null resource name string as deployed with the event definition","Guard the call and skip the filter if the name is unknown (leave it unset for an unfiltered query)","Use eventDefinitionResourceNameLike(...) when only a partial pattern is known"],"exampleFix":"// before\nquery.eventDefinitionResourceName(null);\n// after\nif (resourceName != null) {\n    query.eventDefinitionResourceName(resourceName);\n}","handlingStrategy":"validation","validationCode":"if (resourceName == null || resourceName.isEmpty()) { throw new IllegalArgumentException(\"resourceName required for eventDefinitionResourceName()\"); }","typeGuard":"boolean hasText(String s) { return s != null && !s.trim().isEmpty(); }","tryCatchPattern":"try { query.eventDefinitionResourceName(name); } catch (FlowableIllegalArgumentException e) { log.warn(\" resourceName null, skipping filter\"); }","preventionTips":["Verify the exact resource name as stored in ACT_GE_BYTEARRAY / event registry tables","Null-check optional config lookups before applying filters","Use the *Like variant when the full name is not known"],"tags":["flowable","query","null-argument","event-registry"],"backgroundTag":"null-argument","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}