{"record":{"id":"3a788e9679adb3d3","repo":"flowable/flowable-engine","slug":"invalid-character-c1","errorCode":null,"errorMessage":"invalid character '\" + c1 + \"'","messagePattern":"invalid character '\" \\+ c1 \\+ \"'","errorType":"exception","errorClass":"ScanException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/de/odysseus/el/tree/impl/Scanner.java","lineNumber":451,"sourceCode":"\t\tif (Character.isJavaIdentifierStart(c1)) {\n\t\t\tint i = position+1;\n\t\t\tint l = input.length();\n\t\t\twhile (i < l && Character.isJavaIdentifierPart(input.charAt(i))) {\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tString name = input.substring(position, i);\n\t\t\tToken keyword;\n\t\t\tswitch (token.getSymbol()) {\n\t\t\t\tcase COLON:\n\t\t\t\t\tkeyword = javaKeyword(name);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tkeyword = keyword(name);\n\t\t\t}\n\t\t\treturn keyword == null ? token(Symbol.IDENTIFIER, name, i - position) : keyword;\n\t\t}\n\n\t\tthrow new ScanException(position, \"invalid character '\" + c1 + \"'\", \"expression token\");\n\t}\n\t\n\tprotected Token nextToken() throws ScanException {\n\t\tif (isEval()) {\n\t\t\tif (input.charAt(position) == '}') {\n\t\t\t\treturn fixed(Symbol.END_EVAL);\n\t\t\t}\n\t\t\treturn nextEval();\n\t\t} else {\n\t\t\tif (position+1 < input.length() && input.charAt(position+1) == '{') {\n\t\t\t\tswitch (input.charAt(position)) {\n\t\t\t\t\tcase '#':\n\t\t\t\t\t\treturn fixed(Symbol.START_EVAL_DEFERRED);\n\t\t\t\t\tcase '$':\n\t\t\t\t\t\treturn fixed(Symbol.START_EVAL_DYNAMIC);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn nextText();","sourceCodeStart":433,"sourceCodeEnd":469,"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/Scanner.java#L433-L469","documentation":"Scanner.nextEval() throws ScanException(\"invalid character 'c'\") when, while scanning the inside of a ${...} evaluation block, the current character cannot start any valid expression token (not a digit, letter, quote, operator, or whitespace). The expected field is 'expression token'.","triggerScenarios":"Any character outside the EL grammar appearing inside ${...}, such as '@', '#', '!', misused, a stray '%' or '~' that is not part of an operator, or a control/unicode character pasted into the expression.","commonSituations":"Copy-pasting expressions from documents/emails introducing smart quotes or invisible characters; typos in operators (e.g. '##'); placeholder syntax from other templating engines (#{} or %%{}) pasted into a ${} block; corrupted config files with encoding issues.","solutions":["Find and remove/replace the reported invalid character (ScanException includes position and the character).","Re-type the expression manually instead of pasting to eliminate smart quotes and invisible Unicode.","Ensure only supported operator/symbol characters are used inside ${...} blocks.","Check file encoding (UTF-8 vs Latin-1) if the character came from a config file."],"exampleFix":"// before\nString expr = \"${order#total > 5}\"; // '#' invalid here\n// after\nString expr = \"${order.total > 5}\";","handlingStrategy":"validation","validationCode":"// reject characters that cannot start an EL token inside ${...}\nPattern VALID = Pattern.compile(\"[A-Za-z0-9_$'\\\"().,=<>!+\\-*/%?:&|^~{}\\\\[\\\\] ]*\");\nboolean scanClean(String expr) { return VALID.matcher(expr).matches(); }","typeGuard":null,"tryCatchPattern":"try {\n    builder.build(expr);\n} catch (TreeBuilderException e) {\n    throw new IllegalArgumentException(\"Invalid character in expression near pos \" + e.getPosition() + \": \" + expr);\n}","preventionTips":["Strip smart quotes and invisible Unicode when pasting expressions.","Use only documented EL operators inside ${...} blocks.","Validate config file encoding (UTF-8).","Parse-check expressions in CI."],"tags":["el","scanner","invalid-character","syntax-error"],"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-18T11:17:12.947Z"}