{"record":{"id":"4a5da97fd3fc8f13","repo":"flowable/flowable-engine","slug":"provided-handlertype-is-null-4a5da9","errorCode":null,"errorMessage":"Provided handlerType is null","messagePattern":"Provided handlerType is null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-job-service/src/main/java/org/flowable/job/service/impl/SuspendedJobQueryImpl.java","lineNumber":396,"sourceCode":"    }\n\n    @Override\n    public SuspendedJobQueryImpl executionId(String executionId) {\n        if (executionId == null) {\n            throw new FlowableIllegalArgumentException(\"Provided execution id is null\");\n        }\n        if (inOrStatement) {\n            this.currentOrQueryObject.executionId = executionId;\n        } else {\n            this.executionId = executionId;\n        }\n        return this;\n    }\n\n    @Override\n    public SuspendedJobQueryImpl handlerType(String handlerType) {\n        if (handlerType == null) {\n            throw new FlowableIllegalArgumentException(\"Provided handlerType is null\");\n        }\n        if (inOrStatement) {\n            this.currentOrQueryObject.handlerType = handlerType;\n        } else {\n            this.handlerType = handlerType;\n        }\n        return this;\n    }\n\n    @Override\n    public SuspendedJobQueryImpl handlerTypes(Collection<String> handlerTypes) {\n        if (handlerTypes == null) {\n            throw new FlowableIllegalArgumentException(\"Provided handlerTypes are null\");\n        }\n        if (inOrStatement) {\n            this.currentOrQueryObject.handlerTypes = handlerTypes;\n        } else {\n            this.handlerTypes = handlerTypes;","sourceCodeStart":378,"sourceCodeEnd":414,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-job-service/src/main/java/org/flowable/job/service/impl/SuspendedJobQueryImpl.java#L378-L414","documentation":"SuspendedJobQueryImpl.handlerType(String) throws FlowableIllegalArgumentException when the supplied handlerType is null. The handler type (e.g. the async-continuation or external-worker handler type) is a mandatory non-null string for this filter; Flowable rejects nulls eagerly so the query builder fails at configuration time rather than during execution.","triggerScenarios":"Calling handlerType(null), e.g. passing a handler type read from configuration (process XML extension attribute, Spring property, or constants class) where the property is undefined, or passing an enum lookup that resolved to null.","commonSituations":"Misconfigured external-worker setups where the expected handler type constant changed between Flowable versions; typing the wrong property key when loading the handler type from config.","solutions":["Pass a concrete handler type constant from HandlerTypes (e.g. HandlerTypes.ASYNC_CONTINUATION or your external-worker type).","Validate configuration loading: if handlerType comes from a property, default it or fail at startup with a clear message.","If you want to match multiple handler types, use handlerTypes(Collection) with a non-null, non-empty collection."],"exampleFix":"// before\nString type = props.getProperty(\"job.handlerType\");\nquery.handlerType(type); // throws when property missing\n// after\nString type = props.getProperty(\"job.handlerType\", HandlerTypes.ASYNC_CONTINUATION);\nquery.handlerType(type);","handlingStrategy":"validation","validationCode":"if (handlerType == null) {\n    handlerType = HandlerTypes.ASYNC_CONTINUATION; // or fail fast with a clear message\n}","typeGuard":"boolean isValidHandlerType(String t) { return t != null && HandlerTypes.getAllJobHandlerTypes().contains(t); }","tryCatchPattern":"try {\n    query.handlerType(handlerType);\n} catch (FlowableIllegalArgumentException e) {\n    throw new ConfigurationException(\"job.handlerType is not configured\", e);\n}","preventionTips":["Use Flowable's HandlerTypes constants instead of free-form strings from config.","Validate handler-type configuration at application startup.","After Flowable version upgrades, re-check that your configured handler type values still exist."],"tags":["flowable","query","null-check","job-service","handler-type"],"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"}