When the virtual service is created and deployed it shows error in server console inspection view and goes to ended state. Below is the stack trace:
============================================================================
| java.lang.RuntimeException: Cannot load keystore file named /opt/CA/DevTest/DevTest-8.4-tmpdir/lads/A79833EA041A11E7ADBE00505620D39E/Debug/keystore.jks
============================================================================
| Step: Virtual HTTPS Listener 15000
----------------------------------------------------------------------------
| Message: Cannot load keystore file named /opt/CA/DevTest/DevTest-8.4-tmpdir/lads/A79833EA041A11E7ADBE00505620D39E/Debug/keystore.jks
----------------------------------------------------------------------------
| Trapped Exception: Cannot load keystore file named /opt/CA/DevTest/DevTest-8.4-tmpdir/lads/A79833EA041A11E7ADBE00505620D39E/Debug/keystore.jks
| Trapped Message: java.lang.RuntimeException: Cannot load keystore file named /opt/CA/DevTest/DevTest-8.4-tmpdir/lads/A79833EA041A11E7ADBE00505620D39E/Debug/keystore.jks
----------------------------------------------------------------------------
STACK TRACE
java.lang.RuntimeException: Cannot load keystore file named /opt/CA/DevTest/DevTest-8.4-tmpdir/lads/A79833EA041A11E7ADBE00505620D39E/Debug/keystore.jks
at com.itko.lisa.utils.ssl.VSESSLContext.getSSLContext(VSESSLContext.java:149)
at com.itko.lisa.utils.ssl.VSESSLContext.getSSLServerContext(VSESSLContext.java:116)
at com.itko.lisa.vse.stateful.protocol.http.HttpListenStep.getSSLContext(HttpListenStep.java:610)
at com.itko.lisa.vse.stateful.protocol.http.HttpListenStep.execute(HttpListenStep.java:461)
at com.itko.lisa.test.TestNode.executeNode(TestNode.java:981)
at com.itko.lisa.test.TestCase.execute(TestCase.java:1280)
at com.itko.lisa.test.TestCase.execute(TestCase.java:1195)
at com.itko.lisa.test.TestCase.executeNextNode(TestCase.java:1180)
at com.itko.lisa.test.TestCase.executeTest(TestCase.java:1124)
at com.itko.lisa.coordinator.Instance.run(Instance.java:204)
============================================================================
When a virtual service is deployed from workstation, a MAR is created that includes all the artifacts used in the Virtual Service. By default all the assets used within the project folder and its sub-directories are included. If there are any assets outside the project folder, they won't be included in the MAR file.
In this case the keystore that is used during virtual service recording is referred from a location outside project folder. Hence, while the MAR file is created during virtual service deployment, the keystore file being referred in the listen step of the VSM is not included in the MAR file resulting in the error complaining about keystore location.
To resolve the problem, move the keystore file into project folder and refer it correctly from the listen step of the Virtual Service Model.
Delete existing virtual service from server console and redeploy the updated Virtual Service.