{"record":{"id":"65e9d727d1782f37","repo":"flowable/flowable-engine","slug":"method-getmethodcallsyntax-is-not-supported-65e9d7","errorCode":null,"errorMessage":"Method getMethodCallSyntax is not supported","messagePattern":"Method getMethodCallSyntax is not supported","errorType":"exception","errorClass":"java.lang.UnsupportedOperationException","httpStatus":null,"severity":"warning","filePath":"modules/flowable5-engine/src/main/java/org/activiti/engine/impl/scripting/JuelScriptEngineFactory.java","lineNumber":67,"sourceCode":"\n    @Override\n    public List<String> getExtensions() {\n        return extensions;\n    }\n\n    @Override\n    public String getLanguageName() {\n        return \"JSP 2.1 EL\";\n    }\n\n    @Override\n    public String getLanguageVersion() {\n        return \"2.1\";\n    }\n\n    @Override\n    public String getMethodCallSyntax(String obj, String method, String... arguments) {\n        throw new UnsupportedOperationException(\"Method getMethodCallSyntax is not supported\");\n    }\n\n    @Override\n    public List<String> getMimeTypes() {\n        return mimeTypes;\n    }\n\n    @Override\n    public List<String> getNames() {\n        return names;\n    }\n\n    @Override\n    public String getOutputStatement(String toDisplay) {\n        // We will use out:print function to output statements\n        StringBuilder stringBuffer = new StringBuilder();\n        stringBuffer.append(\"out:print(\\\"\");\n","sourceCodeStart":49,"sourceCodeEnd":85,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable5-engine/src/main/java/org/activiti/engine/impl/scripting/JuelScriptEngineFactory.java#L49-L85","documentation":"JuelScriptEngineFactory implements the javax.script ScriptEngineFactory contract but does not support getMethodCallSyntax, unconditionally throwing UnsupportedOperationException. The JUEL-based engine only supports evaluation, not this optional factory feature.","triggerScenarios":"Calling getMethodCallSyntax(\"obj\", \"method\", args...) on the JUEL ScriptEngineFactory — e.g. generic script-hosting code (IDE tooling, script frameworks) that calls every ScriptEngineFactory method uniformly.","commonSituations":"Generic tooling that enumerates script engines and calls getMethodCallSyntax for each, unit tests exercising the full ScriptEngineFactory interface, code generated for other engines (JS, Groovy) being reused with JUEL.","solutions":["Do not call getMethodCallSyntax on the JUEL engine; build method-call syntax yourself for JUEL expressions.","Guard generic code with a check for UnsupportedOperationException when calling optional factory methods.","Switch to a script engine whose factory supports getMethodCallSyntax if that feature is required.","Catch UnsupportedOperationException locally and fall back to manual syntax construction."],"exampleFix":"// before\nString call = factory.getMethodCallSyntax(\"obj\", \"doIt\", \"a\");\n// after\nString call;\ntry {\n    call = factory.getMethodCallSyntax(\"obj\", \"doIt\", \"a\");\n} catch (UnsupportedOperationException e) {\n    call = \"obj.doIt(a)\"; // manual JUEL syntax\n}","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    return factory.getMethodCallSyntax(obj, method, args);\n} catch (UnsupportedOperationException e) {\n    return obj + \".\" + method + \"(\" + String.join(\", \", args) + \");\n}","preventionTips":["Treat getMethodCallSyntax as optional in generic multi-engine code.","Feature-detect supported factory methods per engine before use."],"tags":["scripting","unsupported-operation","juel"],"backgroundTag":"unsupported-operation","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"}