{"record":{"id":"397b240a4ae679f6","repo":"flowable/flowable-engine","slug":"error-identifier-method-access","errorCode":null,"errorMessage":"error.identifier.method.access","messagePattern":"error\\.identifier\\.method\\.access","errorType":"exception","errorClass":"ELException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/de/odysseus/el/tree/impl/ast/AstIdentifier.java","lineNumber":181,"sourceCode":"\t\t\t\t}\n\t\t\t\t@Override\n\t\t\t\tpublic String getExpressionString() {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\t@Override\n\t\t\t\tpublic int hashCode() {\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t\t@Override\n\t\t\t\tpublic boolean equals(Object obj) {\n\t\t\t\t\treturn obj == this;\n\t\t\t\t}\n\t\t\t\t@Override\n\t\t\t\tpublic Object invoke(ELContext context, Object[] params) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\treturn method.invoke(null, params);\n\t\t\t\t\t} catch (IllegalAccessException e) {\n\t\t\t\t\t\tthrow new ELException(LocalMessages.get(\"error.identifier.method.access\", name), e);\n\t\t\t\t\t} catch (IllegalArgumentException e) {\n\t\t\t\t\t\tthrow new ELException(LocalMessages.get(\"error.identifier.method.invocation\", name, e));\n\t\t\t\t\t} catch (InvocationTargetException e) {\n\t\t\t\t\t\tthrow new ELException(LocalMessages.get(\"error.identifier.method.invocation\", name, e.getCause()));\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic MethodInfo getMethodInfo(ELContext context) {\n\t\t\t\t\treturn new MethodInfo(method.getName(), method.getReturnType(), method.getParameterTypes());\n\t\t\t\t}\n\t\t\t};\n\t\t} else if (value instanceof MethodExpression) {\n\t\t\treturn (MethodExpression)value;\n\t\t}\n\t\tthrow new MethodNotFoundException(LocalMessages.get(\"error.identifier.method.notamethod\", name, value.getClass()));\n\t}\n\n\t@Override","sourceCodeStart":163,"sourceCodeEnd":199,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/de/odysseus/el/tree/impl/ast/AstIdentifier.java#L163-L199","documentation":"Wraps java.lang.IllegalAccessException raised while reflectively invoking the resolved static method (method.invoke(null, params)). Even though an accessible Method object was found earlier, the JVM refused the reflective call, typically due to access restrictions (module encapsulation or security manager).","triggerScenarios":"Invoking a method expression whose identifier resolved to a Method that passed findAccessibleMethod but still fails at invoke time — e.g. Java 9+ module system denying access to a non-exported package, or a SecurityManager blocking reflection.","commonSituations":"Running Flowable on Java 9+ with strong encapsulation where the delegate class lives in a non-exported/internal package; invoking static methods in JDK internals; app-server security policies restricting reflection.","solutions":["Open/export the containing package via --add-opens/--add-exports JVM flags","Move the target method into an exported, public package","Make the method properly public so findAccessibleMethod returns a truly invokable Method","Remove or relax SecurityManager restrictions if present"],"exampleFix":"// before (Java 16+, module not opened)\njava -jar app.jar\n// after\njava --add-opens com.myapp.internal=com.flowable app.jar","handlingStrategy":"try-catch","validationCode":"try {\n  method.setAccessible(true); // fail fast with a clear AccessDeniedException before EL evaluation\n} catch (RuntimeException e) {\n  throw new IllegalStateException(\"JVM denies reflective access to \" + method, e);\n}","typeGuard":null,"tryCatchPattern":"try {\n  methodExpr.invoke(context, params);\n} catch (ELException e) {\n  if (e.getCause() instanceof IllegalAccessException) {\n    logger.error(\"Module/security blocked reflective access; add --add-opens for the package\");\n  }\n  throw e;\n}","preventionTips":["On Java 9+, keep delegate classes in exported packages or pass --add-opens","Run integration tests on the same JDK as production","Avoid invoking JDK-internal statics from EL","Minimize SecurityManager usage or explicitly permit reflection for delegates"],"tags":["reflection","access","java-modules","el"],"backgroundTag":"permission-denied","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"}