{"record":{"id":"c2de9bc083b5f806","repo":"flowable/flowable-engine","slug":"e-getmessage-c2de9b","errorCode":null,"errorMessage":"e.getMessage()","messagePattern":"e\\.getMessage\\(\\)","errorType":"exception","errorClass":"TreeBuilderException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/de/odysseus/el/tree/impl/Builder.java","lineNumber":108,"sourceCode":"\t\t}\n\t}\n\t\n\t/**\n\t * @return <code>true</code> iff the specified feature is supported.\n\t */\n\tpublic boolean isEnabled(Feature feature) {\n\t\treturn features.contains(feature);\n\t}\n\t\n\t/**\n\t * Parse expression.\n\t */\n    @Override\n\tpublic Tree build(String expression) throws TreeBuilderException {\n\t\ttry {\n\t\t\treturn createParser(expression).tree();\n\t\t} catch (ScanException e) {\n\t\t\tthrow new TreeBuilderException(expression, e.position, e.encountered, e.expected, e.getMessage());\n\t\t} catch (ParseException e) {\n\t\t\tthrow new TreeBuilderException(expression, e.position, e.encountered, e.expected, e.getMessage());\n\t\t}\n\t}\n\n\tprotected Parser createParser(String expression) {\n\t\treturn new Parser(this, expression);\n\t}\t\n\t\n\t@Override\n\tpublic boolean equals(Object obj) {\n\t\tif (obj == null || obj.getClass() != getClass()) {\n\t\t\treturn false;\n\t\t}\n\t\treturn features.equals(((Builder)obj).features);\n\t}\n\t\n\t@Override","sourceCodeStart":90,"sourceCodeEnd":126,"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/Builder.java#L90-L126","documentation":"TreeBuilderImpl.build() parses an expression and, on ScanException or ParseException, rethrows it as a TreeBuilderException carrying the expression, error position, encountered text, expected tokens, and e.getMessage() as the detail message. It is the parse-failure path of the EL compiler — the expression string is syntactically invalid.","triggerScenarios":"build(expression) is invoked with a syntactically invalid EL string, e.g. unbalanced '${', bad escape sequences, or illegal token sequences, and the underlying parser throws ScanException/ParseException.","commonSituations":"Process definitions or templates containing broken expressions (missing '}', stray quotes); dynamically composed expressions where variable interpolation produced invalid EL; expressions containing characters the scanner does not accept (locale text, newlines).","solutions":["Fix the expression syntax at the reported position (the exception exposes position, encountered, and expected).","Escape or remove characters not allowed by the EL grammar (quotes, '${' without matching '}').","Validate expressions at deploy/build time using a TreeBuilder parse pass instead of at runtime.","Catch TreeBuilderException and log expression + position to locate the offending definition quickly."],"exampleFix":"// before\nString expr = \"${user.name \" ; // unbalanced -> TreeBuilderException\n// after\nString expr = \"${user.name}\"; // or pre-validate:\ntry { treeBuilder.build(expr); } catch (TreeBuilderException e) {\n    throw new IllegalArgumentException(\"Bad EL at \" + e.getPosition() + \": \" + expr);\n}","handlingStrategy":"validation","validationCode":"// pre-validate an expression before using it at runtime\ntry {\n    new TreeBuilderImpl(new Builder()).build(expression);\n} catch (TreeBuilderException e) {\n    throw new IllegalArgumentException(\"Invalid EL at pos \" + e.getPosition()\n        + \", encountered '\" + e.getEncountered() + \"', expected \" + e.getExpected());\n}","typeGuard":null,"tryCatchPattern":"try {\n    Tree tree = treeBuilder.build(expression);\n} catch (TreeBuilderException e) {\n    log.error(\"EL parse error in '{}' at pos {}: encountered '{}' expected {}\",\n        e.getExpression(), e.getPosition(), e.getEncountered(), e.getExpected());\n    throw new IllegalArgumentException(\"Malformed expression\", e);\n}","preventionTips":["Validate all expressions at deploy/build time with a parse dry run.","Escape '${' when emitting literal text and balance braces when composing expressions dynamically.","Sanitize user input before embedding it into expression strings.","Include position/expected-token info in your error reports to speed up fixes."],"tags":["el","parse-error","syntax"],"backgroundTag":"invalid-argument-format","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}