flowable/flowable-engine · warning · java.lang.UnsupportedOperationException

Method getMethodCallSyntax is not supported

Error message

Method getMethodCallSyntax is not supported

What it means

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.

Solutions

  1. Do not call getMethodCallSyntax on the JUEL engine; build method-call syntax yourself for JUEL expressions.
  2. Guard generic code with a check for UnsupportedOperationException when calling optional factory methods.
  3. Switch to a script engine whose factory supports getMethodCallSyntax if that feature is required.
  4. Catch UnsupportedOperationException locally and fall back to manual syntax construction.

Example fix

// before
String call = factory.getMethodCallSyntax("obj", "doIt", "a");
// after
String call;
try {
    call = factory.getMethodCallSyntax("obj", "doIt", "a");
} catch (UnsupportedOperationException e) {
    call = "obj.doIt(a)"; // manual JUEL syntax
}
Defensive patterns

Strategy: try-catch

Try / catch

try {
    return factory.getMethodCallSyntax(obj, method, args);
} catch (UnsupportedOperationException e) {
    return obj + "." + method + "(" + String.join(", ", args) + ");
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11). Data as JSON: /api/errors/65e9d727d1782f37. Report an issue: GitHub.

Appendix: source

Thrown at modules/flowable5-engine/src/main/java/org/activiti/engine/impl/scripting/JuelScriptEngineFactory.java:67

    @Override
    public List<String> getExtensions() {
        return extensions;
    }

    @Override
    public String getLanguageName() {
        return "JSP 2.1 EL";
    }

    @Override
    public String getLanguageVersion() {
        return "2.1";
    }

    @Override
    public String getMethodCallSyntax(String obj, String method, String... arguments) {
        throw new UnsupportedOperationException("Method getMethodCallSyntax is not supported");
    }

    @Override
    public List<String> getMimeTypes() {
        return mimeTypes;
    }

    @Override
    public List<String> getNames() {
        return names;
    }

    @Override
    public String getOutputStatement(String toDisplay) {
        // We will use out:print function to output statements
        StringBuilder stringBuffer = new StringBuilder();
        stringBuffer.append("out:print(\"");

View on GitHub (pinned to d6d39ce1c6)