I reproduced the error in postman with intercepted payload and URL :
But my JSON seems okay on JSON lint, and all returned vars exist in my process.
I’ve got this terminal output :
Caused by: javax.script.ScriptException: SyntaxError: Invalid JSON: :1:0 Expected json literal but found N
Not found
^ in at line number 2
at jdk.nashorn.api.scripting.NashornScriptEngine.throwAsScriptException(NashornScriptEngine.java:470)
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:454)
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:406)
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:402)
at jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:155)
at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:233)
at org.camunda.bpm.engine.impl.scripting.SourceExecutableScript.evaluateScript(SourceExecutableScript.java:114)
… 196 more
Caused by: :2 SyntaxError: Invalid JSON: :1:0 Expected json literal but found N
Not found
^
at jdk.nashorn.internal.runtime.ECMAErrors.error(ECMAErrors.java:57)
at jdk.nashorn.internal.runtime.ECMAErrors.syntaxError(ECMAErrors.java:160)
at jdk.nashorn.internal.runtime.ECMAErrors.syntaxError(ECMAErrors.java:145)
at jdk.nashorn.internal.runtime.JSONFunctions.parse(JSONFunctions.java:81)
at jdk.nashorn.internal.objects.NativeJSON.parse(NativeJSON.java:119)
at jdk.nashorn.internal.scripts.Script$23$^eval_.:program(:2)
at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:637)
at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:494)
at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393)
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:449)
… 201 more
Caused by: jdk.nashorn.internal.runtime.ParserException: :1:0 Expected json literal but found N
Not found
^
at jdk.nashorn.internal.parser.JSONParser.error(JSONParser.java:529)
at jdk.nashorn.internal.parser.JSONParser.error(JSONParser.java:533)
at jdk.nashorn.internal.parser.JSONParser.expectedError(JSONParser.java:541)
at jdk.nashorn.internal.parser.JSONParser.parseLiteral(JSONParser.java:182)
at jdk.nashorn.internal.parser.JSONParser.parse(JSONParser.java:148)
at jdk.nashorn.internal.runtime.JSONFunctions.parse(JSONFunctions.java:79)
… 207 more
Any idea ? Thanks