Release Automation

 View Only
  • 1.  Java error on "Execute JavaScript code" action

    Posted Aug 25, 2017 08:19 AM

    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.



  • 2.  Re: Java error on "Execute JavaScript code" action

    Broadcom Employee
    Posted Aug 25, 2017 11:19 AM

    By any chance have you updated your action packs to the latest versions? 



  • 3.  Re: Java error on "Execute JavaScript code" action

    Posted Aug 25, 2017 11:27 AM

    We upgraded NAC ans NES using 6.5 ISO and agents through ASAP.

    Is "Execute JavaScript code" action in nolio-actions action pack ? If so, it is still un 6.1 when others are in 6.5...


    Moreover it looks like the question discussed here :

    Javascript unexpected failure? 

     

    Regards.



  • 4.  Re: Java error on "Execute JavaScript code" action

    Broadcom Employee
    Posted Aug 25, 2017 11:33 AM

    Indeed, that does seem similar on the surface at least. Hmm...Have you also upgraded the agents all the way to 6.5? If so, this might merit exploring over a support case so we can take a look at the action jars. 



  • 5.  Re: Java error on "Execute JavaScript code" action

    Posted Aug 25, 2017 11:43 AM

    Yes we upgraded agents to 6.5.

     

    I will open a case on monday though as I can't do it now.

     

    By the way do you think it is normal that nolio-actions action pack is still in 6.1 ?

     

    Regards.



  • 6.  Re: Java error on "Execute JavaScript code" action

    Broadcom Employee
    Posted Aug 25, 2017 12:18 PM

    It may be - I don't recall off the top of my head for this specific scenario, but generally speaking, it's normal to some a little mix of versions here and there (as long as there aren't duplicates). An upgrade to 6.5 won't necessarily mean every single jar will reflect 6.5.



  • 7.  Re: Java error on "Execute JavaScript code" action

    Posted Aug 25, 2017 12:45 PM

    OK thank you for your answer.

    I will open a case on monday.

     

    Regards.



  • 8.  Re: Java error on "Execute JavaScript code" action
    Best Answer

    Broadcom Employee
    Posted Aug 28, 2017 12:33 PM

    Hi Nicolas,

     I am marking this thread as answered as we are able to get it working on the case where we found that the issue was related to the jar nolio-actions.6.1.0.jar which was not been replaced with 6.5 version jar post system upgraded to 6.5.

     

    To fix this issue we have imported the nolio-actions.6.5.0.jar manually from ROC and it fixed the issue.

     

    Regards,

    Saurabh