Hi,
We just upgraded or RA test environment from 5.5 to 6.1 then to 6.5 and we encounter an error we did not have before.
Executing an "Execute JavaScript code" Action we meet the following error :
Unexpected failure: java.lang.NoSuchMethodException: None of the fixed arity signatures [(java.lang.Class, int), (java.lang.Class, int[])] or the variable arity signatures [(java.lang.Class, int...)] of the method java.lang.reflect.Array.newInstance match the argument types [jdk.internal.dynalink.beans.StaticClass, java.lang.Integer]
The action is as follows :
Input 1 : TESTSTRING_1.0.0
Script :
function splitString(stringValeur)
{
var tab = stringValeur.split("_");
return tab[tab.length - 1];
}
var output1 = splitString(input1);
Output 1 : <Version>
On the agent nolio_all.log we see the stack :
2017-08-25 14:14:58,903 [job-9830408-jobServer-9830408-6:Copy of JS - recuperer la version de Build dans le RM(P16375927.F16375931.E16375932):Execute JavaScript code] ERROR (com.nolio.platform.shared.datamo
del.Action:119) - Unexpected failure:
java.lang.RuntimeException: java.lang.NoSuchMethodException: None of the fixed arity signatures [(java.lang.Class, int), (java.lang.Class, int[])] or the variable arity signatures [(java.lang.Class, int...)
] of the method java.lang.reflect.Array.newInstance match the argument types [jdk.internal.dynalink.beans.StaticClass, java.lang.Integer]
at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:397)
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:446)
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:403)
at jdk.nashorn.api.scripting.NashornScriptEngine.evalImpl(NashornScriptEngine.java:399)
at jdk.nashorn.api.scripting.NashornScriptEngine.eval(NashornScriptEngine.java:155)
at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
at com.nolio.platform.shared.executables.actions.JavaScriptAction.convertToJavaArray(JavaScriptAction.java:157)
at com.nolio.platform.shared.executables.actions.JavaScriptAction.getArrayValue(JavaScriptAction.java:144)
at com.nolio.platform.shared.executables.actions.JavaScriptAction.execute(JavaScriptAction.java:104)
at com.nolio.platform.shared.datamodel.ActionExecutionState.localExecution(ActionExecutionState.java:384)
at com.nolio.platform.shared.datamodel.ActionExecutionState.access$500(ActionExecutionState.java:45)
at com.nolio.platform.shared.datamodel.ActionExecutionState$2.execAction(ActionExecutionState.java:131)
at com.nolio.platform.shared.datamodel.ActionExecutionState.exec(ActionExecutionState.java:401)
at com.nolio.platform.shared.datamodel.Action.run(Action.java:229)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at com.nolio.platform.shared.flowcontrol.LocalFlowController$JobBoundThreadFactory$1.run(LocalFlowController.java:804)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NoSuchMethodException: None of the fixed arity signatures [(java.lang.Class, int), (java.lang.Class, int[])] or the variable arity signatures [(java.lang.Class, int...)] of the method java.lang.reflect.Array.newInstance match the argument types [jdk.internal.dynalink.beans.StaticClass, java.lang.Integer]
at jdk.internal.dynalink.beans.OverloadedMethod.throwNoSuchMethod(OverloadedMethod.java:206)
at jdk.nashorn.internal.scripts.Script$21$\^eval\_.:program(<eval>:1)
at jdk.nashorn.internal.runtime.ScriptFunctionData.invoke(ScriptFunctionData.java:623)
at jdk.nashorn.internal.runtime.ScriptFunction.invoke(ScriptFunction.java:494)
at jdk.nashorn.internal.runtime.ScriptRuntime.apply(ScriptRuntime.java:393)
... 19 more
Any idea about that ?
Regards.