Release Automation

 View Only
Expand all | Collapse all

Error using "Json - Execute Multiple Queries" action

  • 1.  Error using "Json - Execute Multiple Queries" action

    Posted Mar 15, 2016 02:40 PM

    We're trying to use the "Json - Execute Multiple Queries" to extract specific parts of a JSON object, but get the following error. Attached is a screenshot of the action. Does anyone know the cause of the highlighted (bolded) error?

     

    2016-03-15 09:13:03,138 [job-131219-jobServer-131220-2:Json - Execute Multiple Queries Using JSONPath(P2398.F21915.E21919):Json - Execute Multiple Queries Using JSONPath] DEBUG (com.nolio.platform.shared.parameter.InParameterPlaceHolder:170) - PlaceHolder for field [jsonObject] got value [{

        "DeploymentBundle": {

            "description": "Deployment Bundle - Ultar Demo",

            "cloudDeployments": [{

                "description": "Cloud Deployment 002",

                "cloudType": "openStack",

                "definitionFormat": "heat",

                "definition": {

                    "template": {

                     

                    },

                    "templateParameterValues": {

                        "parameters": "values"

                    }

                }

            }]

        }

    }]

    2016-03-15 09:13:03,138 [job-131219-jobServer-131220-2:Json - Execute Multiple Queries Using JSONPath(P2398.F21915.E21919):Json - Execute Multiple Queries Using JSONPath] DEBUG (com.nolio.platform.shared.datamodel.Action:409) - Next Action Execution State Execute

    2016-03-15 09:13:03,138 [job-131219-jobServer-131220-2:Json - Execute Multiple Queries Using JSONPath(P2398.F21915.E21919):Json - Execute Multiple Queries Using JSONPath] INFO  (com.nolio.platform.shared.datamodel.Action:332) - ------------------------About to execute action [Json - Execute Multiple Queries Using JSONPath(P2398.F21915.E21919):Json - Execute Multiple Queries Using JSONPath]------------------------

    2016-03-15 09:13:03,138 [job-131219-jobServer-131220-2:Json - Execute Multiple Queries Using JSONPath(P2398.F21915.E21919):Json - Execute Multiple Queries Using JSONPath] ERROR (com.nolio.platform.shared.datamodel.Action:119) - Exception caught: java.lang.NoSuchMethodError: com.jayway.jsonpath.JsonPath.parse(Ljava/lang/String;)Lcom/jayway/jsonpath/DocumentContext;

    java.lang.NoSuchMethodError: com.jayway.jsonpath.JsonPath.parse(Ljava/lang/String;)Lcom/jayway/jsonpath/DocumentContext;

      at com.nolio.platform.shared.executables.actions.ExecuteMultiQueriesFromJsonAction.execute(ExecuteMultiQueriesFromJsonAction.java:223)

      at com.nolio.platform.shared.datamodel.ActionExecutionState.localExecution(ActionExecutionState.java:333)

      at com.nolio.platform.shared.datamodel.ActionExecutionState.access$500(ActionExecutionState.java:39)

      at com.nolio.platform.shared.datamodel.ActionExecutionState$2.execAction(ActionExecutionState.java:112)

      at com.nolio.platform.shared.datamodel.ActionExecutionState.exec(ActionExecutionState.java:343)

      at com.nolio.platform.shared.datamodel.Action.run(Action.java:227)

      at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)

      at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)

      at java.util.concurrent.FutureTask.run(Unknown Source)

      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

      at com.nolio.platform.shared.flowcontrol.LocalFlowController$JobBoundThreadFactory$1.run(LocalFlowController.java:788)

      at java.lang.Thread.run(Unknown Source)

    2016-03-15 09:13:03,138 [job-131219-jobServer-131220-2:Json - Execute Multiple Queries Using JSONPath(P2398.F21915.E21919):Json - Execute Multiple Queries Using JSONPath] DEBUG (com.nolio.platform.shared.datamodel.Action:409) - Next Action Execution State Stopped

    2016-03-15 09:13:03,138 [job-131219-jobServer-131220-2:Json - Execute Multiple Queries Using JSONPath(P2398.F21915.E21919):Json - Execute Multiple Queries Using JSONPath] DEBUG (com.nolio.platform.shared.datamodel.Step:573) - Queued at [5] Json - Execute Multiple Queries Using JSONPath(P2398.F21915.E21919)

    2016-03-15 09:13:03,138 [job-131219-jobServer-131220-2:Json - Execute Multiple Queries Using JSONPath(P2398.F21915.E21919)] DEBUG (com.nolio.platform.shared.flowcontrol.logic.StepExecutionState:35) - StepActionExecutionLogic of "Json - Execute Multiple Queries Using JSONPath"

    2016-03-15 09:13:03,138 [job-131219-jobServer-131220-2:Json - Execute Multiple Queries Using JSONPath(P2398.F21915.E21919)] DEBUG (com.nolio.platform.shared.datamodel.Step:390) - Evaluating Step Result for Json - Execute Multiple Queries Using JSONPath(P2398.F21915.E21919)

    2016-03-15 09:13:03,138 [job-131219-jobServer-131220-2:Json - Execute Multiple Queries Using JSONPath(P2398.F21915.E21919)] INFO  (com.nolio.platform.shared.comm.PublicRelationsService:149) - nodeUpdate| Json - Execute Multiple Queries Using JSONPath | P2398.F21915.E21919 | FAILED_PAUSED

     

    jsonpath_multi_query.png

     

    FTR, the following jars are installed in the agent's \actionslib directory:

    json-20080701.jar

    json-lib-2.1-rev7.jar

    json-path-2.0.0.jar

    json-smart-2.1.1.jar

     

    Message was edited by: Mark Lynch Added json related jars installed in \actionslib dir.



  • 2.  Re: Error using "Json - Execute Multiple Queries" action

    Posted Mar 16, 2016 08:05 AM

    Hello

    Did you import an actions pack created using RDK?



  • 3.  Re: Error using "Json - Execute Multiple Queries" action

    Posted Mar 16, 2016 08:42 AM

    Thanks for responding. We did not import an action pack created using the RDK?



  • 4.  Re: Error using "Json - Execute Multiple Queries" action

    Posted Apr 27, 2016 11:59 AM

    FTR, a case relating to this was opened on 2016-04-04: 00351669.

    It originated as case 00342517 opened on 2016-03-23



  • 5.  Re: Error using "Json - Execute Multiple Queries" action

    Broadcom Employee
    Posted Apr 27, 2016 12:48 PM

    a quick question, is your agent running on windows?



  • 6.  Re: Error using "Json - Execute Multiple Queries" action

    Posted Apr 27, 2016 12:55 PM

    Nope. Redhat EL 7.



  • 7.  Re: Error using "Json - Execute Multiple Queries" action

    Broadcom Employee
    Posted Apr 27, 2016 01:29 PM

    I have run your example on a few servers and for me it only fails on one agent and for this particular agent I have installed a number of json-path.x.x.x.jar files in the past. I think your problem is that you have an older version of the json-path-x.x.x.jar file laying about.  I am trying to work back through the path etc for my one failing agent to see if I can find the old version/remove it and see if that corrects the problem.



  • 8.  Re: Error using "Json - Execute Multiple Queries" action

    Posted Apr 27, 2016 02:00 PM

    Thanks Billy.

    I appreciate you looking into it.



  • 9.  Re: Error using "Json - Execute Multiple Queries" action

    Posted Apr 27, 2016 11:57 PM

    By any chance do you have the nolio-dockers action pack installed on that particular agent?

    Can you check in the actionslib folder if you have both  json-path-0.9.1.jar and json-path-2.0.0.jar. If this is the case then try removing the nolio-dockers action for testing purpose on a test machine and check if that helps.

     

    It looks like the json-path-0.9.1.jar that comes with dockers action does not have the DocumentContext class but the default json-path-2.0.0.jar seem to have this class. It might be a case that the json action is picking the wrong .jar for some reason.

     

    Having said that I could not reproduce this issue in-house neither on Windows nor on Linux machine.



  • 10.  Re: Error using "Json - Execute Multiple Queries" action

    Posted Apr 28, 2016 11:27 AM

    We do not have the nolio-dockers action pack installed anywhere. We only have json-path-2.0.0.jar on the agent running the json action.

     

    FTR, we are using CA Release Automation ver: 6.0.0.511



  • 11.  Re: Error using "Json - Execute Multiple Queries" action

    Posted Apr 28, 2016 05:06 PM

    I searched the CARA management server (which I've been using as a test agent) for json-path files. I did find an older version in /opt/ReleaseAutomationServer/NolioAgent/unzippedActionPacks/dependencies/

     

    /opt/ReleaseAutomationServer/actionslib/json-path-2.0.0.jar

    /opt/ReleaseAutomationServer/NolioAgent/actionslib/json-path-2.0.0.jar

    /opt/ReleaseAutomationServer/NolioAgent/unzippedActionPacks/dependencies/json-path-0.9.0.jar

     

    I removed the 0.9.0.jar file, restarted both the agent and the server and re-ran my test. Both before and after I remove the 0.9.0.jay file, I got a "Error occurred during action execution: defaultReader" error.

    That is the error I've been getting today instead of the NoSuchMethodError noted at the top of this thread.



  • 12.  Re: Error using "Json - Execute Multiple Queries" action

    Posted Apr 28, 2016 05:47 PM

    At Chip's suggestion, I'm posting the complete list of action packs I have installed, and their versions:

     

       

    nolio-actions-files6.0.0
    nolio-rc-actions6.0.0
    nolio-actions6.0.0
    nolio-development-actions10.0.0
    nolio-actions-security6.0.0
    ca-actions-field-ra10.0.2
    ca-actions-field-utilities-10.010.0.7
    nolio-git-actions10.3.1503.1
    nolio-glassfish-actions10.2.1402.1
    nolio-jenkins-actions10.10.1503.1


  • 13.  Re: Error using "Json - Execute Multiple Queries" action

    Broadcom Employee
    Posted Apr 29, 2016 08:03 AM

    Hi,

     

        I have tried this on a 6.1 environment and i see the same error, i have sent the details for the environment to the CA Support engineer dealing with the issue so we can work on the issue and try and identify the underlying problem..

     

    Regards

    Keith



  • 14.  Re: Error using "Json - Execute Multiple Queries" action

    Posted Apr 29, 2016 03:53 PM

    I just realized that my list of installed action packs above is incomplete. Here is the complete list:

     

      

    nolio-actions-files6.0.0
    nolio-rc-actions6.0.0
    nolio-actions6.0.0
    nolio-development-actions10.0.0
    nolio-actions-security6.0.0
    ca-actions-field-ra10.0.2
    ca-actions-field-utilities-10.010.0.7
    nolio-git-actions10.3.1503.1
    nolio-glassfish-actions10.2.1402.1
    nolio-jenkins-actions10.10.1503.1
    nolio-win-actions10.2.1402.2
    nolio-ibm-rtc-actions10.3.1412.1
    ca-ra-nagios-actions10.1.1410.1
    nolio-nuget-actions10.1.1505.1
    nolio-jfrog-actions10.8.1505.1
    nolio-httpserver-actions10.1.1407.5


  • 15.  Re: Error using "Json - Execute Multiple Queries" action

    Posted Apr 29, 2016 05:48 PM

    At danielwdunn's suggestion I tried the following but still got the same "Error occurred during action execution: defaultReader" error:

    • I deleted the ca-actions-field-ra-10.0.2 action pack.
    • Then I deleted the dependencies.zip from both the server and agent (in this case, 2 locations on the server VM).
    • I also deleted the json-path-0.9.0.jar that was in the Agent installation.
    • I restarted both the server and agent and ran my JSONPath test.
    • I confirmed that the json-path-0.9.0.jar file was still not on the agent after running the test.


  • 16.  Re: Error using "Json - Execute Multiple Queries" action

    Posted Apr 30, 2016 02:42 AM

    Mark, after looking at the logs, the error you are getting now is a "Field Not Found".......I highly recommend you check your parameters.....something is definitely wrong here.......



  • 17.  Re: Error using "Json - Execute Multiple Queries" action
    Best Answer

    Posted May 10, 2016 01:03 PM

    This was resolved by removing the ca-actions-field-ra-10.0.2 action pack and dependencies.zip from within Action Management in ASAP and restarting the agent. The JSON action succeeds afterwards.

     

    Special thanks to Adam Lewandowski at CA Support for this resolution.



  • 18.  Re: Error using "Json - Execute Multiple Queries" action

    Posted Dec 16, 2016 12:23 PM

    Hi,

    I replicate the issue on RA 6.2.x even after checking that the 2 files (ca-actions-field-ra-10.0.* and dependencies.zip) are not more present on my RA installation dir and RA Nexus.

    Did I miss something?

     

    Thanks,

    Cyrille



  • 19.  Re: Error using "Json - Execute Multiple Queries" action

    Posted Dec 18, 2016 01:54 AM

    What about docker action pack? - do you have it?



  • 20.  Re: Error using "Json - Execute Multiple Queries" action

    Broadcom Employee
    Posted Dec 18, 2016 09:06 PM

    HI,

     

    If you use action packs generated with RDK, please try following TechDoc.

    https://www.ca.com/us/services-support/ca-support/ca-support-online/knowledge-base-articles.TEC1618276.html 

     

    Thanks

    Yas



  • 21.  Re: Error using "Json - Execute Multiple Queries" action

    Posted Dec 20, 2016 05:07 AM

    Thank you for your help.

    After digging into my agent logs, I've seen that the agent was loading a deprecated JSON lib (jar) coming from a customized action pack generated from RDK 5.5.

    After removing the RDK action pack from RA (directly from the DB), the JSON action works fine and uses the up to date jar libraries.

     

    Regards,

    Cyrille



  • 22.  Re: Error using "Json - Execute Multiple Queries" action

    Broadcom Employee
    Posted Dec 22, 2016 02:31 AM

    Thanks for your verification.

    I wrote the TechDoc recently because I had same case with other customer. I'm happy to help you.

     

    Cheers

    Yas



  • 23.  Re: Error using "Json - Execute Multiple Queries" action

    Posted Mar 02, 2017 12:14 PM

    Hello,

    I'm having a similar problem.

    Error occurred during action execution: com.jayway.jsonpath.JsonPath.parse(Ljava/lang/String;)Lcom/jayway/jsonpath/DocumentContext;

     

    I've just upgraded from 5.5 to 6.1

    I have DBMAestro developed with RDK.

     

    In my environment I have 2 agents:

    In one of them the json queries wors but not in the other. Both have the same configuration.

     

    Help please.

     

    regards

    Javi



  • 24.  Re: Error using "Json - Execute Multiple Queries" action

    Posted Mar 03, 2017 03:57 AM

    Hi Javi,

     

    Check in the nolio_action_exe.log if a couple of lines above the error stack which JSON library is loaded. Might probably it loads the one of DBMaestro RDK.

    Try to remove the AP or upgrade it to a recent RDK compliant with RA 6.1.

     

    Thanks,

    Cyrille



  • 25.  Re: Error using "Json - Execute Multiple Queries" action

    Posted Mar 03, 2017 07:33 AM

    Hi Cyrille.

    I did not find any error related to.

     

    Anyway, I deleted from the actionslib jar related to dbmaestro and RDK from the agent,  but the same problem continues.

     

    regards

    Javi



  • 26.  Re: Error using "Json - Execute Multiple Queries" action

    Posted Mar 03, 2017 07:42 AM

    You need to remove the jar using action management  UI as the actionslib will be sync once the action will be execute and the jar will be load again. 



  • 27.  Re: Error using "Json - Execute Multiple Queries" action

    Posted Mar 03, 2017 08:12 AM

    Do you think if I move the jar of the server to another path and I restart could work?

    I have people developing with db maestro and i can not delete it.

     

     

    regards

    Javi



  • 28.  Re: Error using "Json - Execute Multiple Queries" action

    Posted Mar 03, 2017 08:30 AM

    I don't think this will help.  The jr will be reload again from the repository.



  • 29.  Re: Error using "Json - Execute Multiple Queries" action

    Posted Mar 07, 2017 04:39 AM

    Hi Javi,

     

    Try to delete the cache of the agent (rm -Rf * <RADIR>/NolioAgent/files_cache), the cache could contain the wrong files references.
    Then this triggers to sync the files against the RA repo.

     

    Thanks,

    Cyrille



  • 30.  Re: Error using "Json - Execute Multiple Queries" action

    Posted Mar 07, 2017 04:54 AM

    Hi All,

    I uninstalled DB Master and now it's working.

     

    I will install again and I will delete the cache files.

     

    regards

    Javi