{"record":{"id":"3968ca3618fb62c6","repo":"flowable/flowable-engine","slug":"token-getimage","errorCode":null,"errorMessage":"' + token.getImage() + '","messagePattern":"' \\+ token\\.getImage\\(\\) \\+ '","errorType":"exception","errorClass":"ParseException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/de/odysseus/el/tree/impl/Parser.java","lineNumber":416,"sourceCode":"\t}\n\n\tprotected final List<FunctionNode> getFunctions() {\n\t\treturn functions;\n\t}\n\t\n\tprotected final List<IdentifierNode> getIdentifiers() {\n\t\treturn identifiers;\n\t}\n\n\tprotected final Token getToken() {\n\t\treturn token;\n\t}\n\n\t/**\n\t * throw exception\n\t */\n\tprotected void fail(String expected) throws ParseException {\n\t\tthrow new ParseException(position, \"'\" + token.getImage() + \"'\", expected);\n\t}\n\n\t/**\n\t * throw exception\n\t */\n\tprotected void fail(Symbol expected) throws ParseException {\n\t\tfail(expected.toString());\n\t}\n\n\t/**\n\t * get lookahead symbol.\n\t */\n\tprotected final Token lookahead(int index) throws ScanException, ParseException {\n\t\tif (lookahead.isEmpty()) {\n\t\t\tlookahead = new LinkedList<>();\n\t\t}\n\t\twhile (index >= lookahead.size()) {\n\t\t\tlookahead.add(new LookaheadToken(scanner.next(), scanner.getPosition()));","sourceCodeStart":398,"sourceCodeEnd":434,"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/Parser.java#L398-L434","documentation":"Parser.fail(String expected) throws a ParseException positioned at the current token, with a message built from the unexpected token image wrapped in single quotes and the expected construct. It is the parser's generic 'I found token X where I expected Y' failure for literal/number parsing, lambda-parameter extraction, and token consumption.","triggerScenarios":"Parsing an expression where a token appears in an illegal place: a non-integer where an integer literal is required (parseInteger), a non-number where a float is required (parseFloat), a malformed lambda parameter list (extractLambdaParameters), or any unexpected token during tree construction (consumeToken).","commonSituations":"Typos in EL expressions such as '${123abc}' or '${fn(,a)}'; malformed lambda syntax like '${x-> }'; copy-pasted expressions from other EL dialects (JSF/JSP vs Flowable) with unsupported syntax.","solutions":["Read ParseException.getPosition(), getEncountered() and getExpected() to see exactly which token was rejected and what was expected.","Fix the expression at the reported position (remove/replace the unexpected token).","Validate expressions at startup/deployment rather than at evaluation time.","Check lambda expressions against the library's supported syntax (identifier list before '->')."],"exampleFix":"// before\nString expr = \"${list->x > 2}\"; // bad lambda syntax\n// after\nString expr = \"${(x -> x > 2)(list)}\";","handlingStrategy":"validation","validationCode":"// parse-check expression before use\ntry {\n    builder.build(expr);\n} catch (TreeBuilderException e) {\n    throw new IllegalArgumentException(\"Token error at \" + e.getPosition() + \": expected \" + e.getExpected());\n}","typeGuard":null,"tryCatchPattern":"try {\n    return builder.build(expr);\n} catch (TreeBuilderException e) {\n    throw new IllegalArgumentException(\"Unexpected token '\" + e.getEncountered() + \"' at \" + e.getPosition() + \", expected \" + e.getExpected());\n}","preventionTips":["Check lambda syntax: parameters must be a comma-separated identifier list followed by '->'.","Avoid pasting expressions from other EL dialects without review.","Test-parse all expressions in CI.","Inspect e.getEncountered()/e.getExpected() when debugging."],"tags":["el","parse-error","syntax","expression-language"],"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"}