{"record":{"id":"b3d6961872d82b20","repo":"flowable/flowable-engine","slug":"resolver-must-not-be-null","errorCode":null,"errorMessage":"resolver must not be null","messagePattern":"resolver must not be null","errorType":"exception","errorClass":"NullPointerException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/javax/el/CompositeELResolver.java","lineNumber":44,"sourceCode":"\n\t}\n\n\tpublic CompositeELResolver(Collection<ELResolver> resolvers) {\n\t\tthis.resolvers.addAll(resolvers);\n\t}\n\n\t/**\n\t * Adds the given resolver to the list of component resolvers. Resolvers are consulted in the\n\t * order in which they are added.\n\t * \n\t * @param elResolver\n\t *            The component resolver to add.\n\t * @throws NullPointerException\n\t *             If the provided resolver is null.\n\t */\n\tpublic void add(ELResolver elResolver) {\n\t\tif (elResolver == null) {\n\t\t\tthrow new NullPointerException(\"resolver must not be null\");\n\t\t}\n\t\tresolvers.add(elResolver);\n\t}\n\n\t/**\n\t * Returns the most general type that this resolver accepts for the property argument, given a\n\t * base object. One use for this method is to assist tools in auto-completion. The result is\n\t * obtained by querying all component resolvers. The Class returned is the most specific class\n\t * that is a common superclass of all the classes returned by each component resolver's\n\t * getCommonPropertyType method. If null is returned by a resolver, it is skipped.\n\t * \n\t * @param context\n\t *            The context of this evaluation.\n\t * @param base\n\t *            The base object to return the most general property type for, or null to enumerate\n\t *            the set of top-level variables that this resolver can evaluate.\n\t * @return null if this ELResolver does not know how to handle the given base object; otherwise\n\t *         Object.class if any type of property is accepted; otherwise the most general property","sourceCodeStart":26,"sourceCodeEnd":62,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/javax/el/CompositeELResolver.java#L26-L62","documentation":"Null-component guard in CompositeELResolver.add: an attempt was made to add a null ELResolver to the composite chain. Since resolvers are consulted in order, a null entry would break EL evaluation, so it is rejected with a NullPointerException per the Javadoc contract.","triggerScenarios":"Programmatically building an EL resolver chain (e.g. in createElResolver / ProcessEngineConfiguration EL resolver setup) and adding a resolver variable that is null — typically an unregistered custom resolver bean or a factory method returning null.","commonSituations":"Flowable engine configuration where a custom EL resolver is conditionally created but returns null; DI wiring where the resolver bean is absent; ordering of initialization before the resolver is constructed.","solutions":["Register only non-null ELResolver instances","Check resolver construction/injection before adding to the composite"],"exampleFix":"// before\ncomposite.add(customResolver); // may be null\n// after\nif (customResolver != null) { composite.add(customResolver); }","handlingStrategy":"validation","validationCode":"if (resolver == null) { throw new IllegalStateException(\"EL resolver not configured\"); } composite.add(resolver);","typeGuard":"void addIfPresent(CompositeELResolver composite, ELResolver r) { if (r != null) composite.add(r); }","tryCatchPattern":"try { composite.add(resolver); } catch (NullPointerException e) { /* resolver construction failed upstream */ }","preventionTips":["Null-check resolvers before adding to the composite","Ensure custom ELResolvers are registered in engine configuration before resolver chain assembly","Fail fast at config-load time if an optional resolver bean is missing"],"tags":["el","resolver","null","configuration","expression-language"],"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"}