ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

Getting Malformed Json Exception when using Service Virtualization plugin.


Article ID: 127151


Updated On:


CA Application Test Service Virtualization CA Continuous Application Insight (PathFinder)


We are getting the following error when using the Jenkins plugin to build the pipeline. Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 8 path $ 

The response seems a valid JSON response, but we still get this exception.


DevTest on release 10.3.


Upgrade the ca-service-virtualization.hpi plugin to Jenkins. 
More information can be found in the link below:
CA Service Virtualization and Jenkins making Continuous Integration and Testing Better Together
In Jenkins, go to “manage Jenkins -> manage plugins -> Advanced” and upload plugin, the existing one will be updated.

After the plugin was upgraded, we started getting the error message:
15:21:01 {"_links":{"self":{"href":""}},"id":"6X999X9999X99x9X9000090999X9X99","name":"VSM-name (Run1User1Cycle)","runType":"TEST","runBy":"X1234567","testStatus":"INITIATED","manuallyTerminated":false}
15:21:01 Test/Suite from MAR file was successfully deployed, id = 6X999X9999X99x9X9000090999X9X99
15:21:02 Charset: null, Locale: en_US 
15:21:02 MimeType: application/json 
15:21:02 Status Check Body: {"id":401,"message":"Authorization failed"} 
Finished: FAILURE 

When running a test from Postman we were getting the same exceptions when trying with different users.
There is a patch available for this issue described in the link below:
lisa-virtualize-invoke API URL gives authorization error when using LDAP credentials

The fix delivered with DE357218 was applied in the Registry server under $DEVTEST_HOME/lib/patches and we were able to run the test and get valid responses this time.