{"record":{"id":"d45c2ea6d26c478f","repo":"Activiti/Activiti","slug":"error-function-access","errorCode":null,"errorMessage":"error.function.access","messagePattern":"error\\.function\\.access","errorType":"exception","errorClass":"ELException","httpStatus":null,"severity":"error","filePath":"activiti-core-common/activiti-juel-jakarta/src/main/java/org/activiti/core/el/juel/tree/impl/ast/AstFunction.java","lineNumber":124,"sourceCode":"            } else {\n                for (int i = 0; i < params.length; i++) {\n                    Object param = getParam(i).eval(bindings, context);\n                    if (param != null || types[i].isPrimitive()) {\n                        params[i] = bindings.convert(param, types[i]);\n                    }\n                }\n            }\n        }\n        return method.invoke(base, params);\n    }\n\n    @Override\n    public Object eval(Bindings bindings, ELContext context) {\n        Method method = bindings.getFunction(index);\n        try {\n            return invoke(bindings, context, null, method);\n        } catch (IllegalAccessException e) {\n            throw new ELException(LocalMessages.get(\"error.function.access\", name), e);\n        } catch (InvocationTargetException e) {\n            throw new ELException(LocalMessages.get(\"error.function.invocation\", name), e.getCause());\n        }\n    }\n\n    @Override\n    public String toString() {\n        return name;\n    }\n\n    @Override\n    public void appendStructure(StringBuilder b, Bindings bindings) {\n        b.append(bindings != null && bindings.isFunctionBound(index) ? \"<fn>\" : name);\n        params.appendStructure(b, bindings);\n    }\n\n    public int getIndex() {\n        return index;","sourceCodeStart":106,"sourceCodeEnd":142,"githubUrl":"https://github.com/Activiti/Activiti/blob/56435b1a97deeafdc09dd40074b056c89fba5a8a/activiti-core-common/activiti-juel-jakarta/src/main/java/org/activiti/core/el/juel/tree/impl/ast/AstFunction.java#L106-L142","documentation":"Raised by AstFunction.eval when the resolved function Method is not accessible to the caller — e.g. it is private/protected/package-private or its class is not accessible — so Method.invoke throws IllegalAccessException, rethrown as ELException error.function.access.","triggerScenarios":"Thrown at activiti-core-common/activiti-juel-jakarta/src/main/java/org/activiti/core/el/juel/tree/impl/ast/AstFunction.java:124 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Make the function method public","Call setAccessible(true) in the FunctionMapper before returning the Method","Expose the function via a public wrapper class"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"56435b1a97deeafdc09dd40074b056c89fba5a8a","analyzedAt":"2026-09-09T21:00:06.703Z","contentChangedAt":"2026-09-09T21:00:06.703Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}