When trying to stage and deploy the Soap web service test case in DevTest getting Unable to instantiate Crypto class; nullpointer exception

book

Article ID: 186876

calendar_today

Updated On:

Products

CA Cloud Test Mobile CA Application Test

Issue/Introduction

When trying to stage and deploy the Soap web service test case using DevTest Workstation, getting Unable to instantiate Crypto class; nullpointer exception but same webservice test case working fine when run in DevTest workstation  ITR locally.

Please find the detailed exception log:

============================================================================

| AxisFault

 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException

 faultSubcode: 

 faultString: Unable to instantiate Crypto class; nested exception is: 

java.lang.NullPointerException; nested exception is: 

org.apache.ws.security.WSSecurityException: Unable to instantiate Crypto class; nested exception is: 

java.lang.NullPointerException

 faultActor: 

 faultNode: 

 faultDetail: 

{http://xml.apache.org/axis/}hostname:lvqma1033.phx.aexp.com


============================================================================

| Step:        wspAMLRiskInfoService_getRiskScore

----------------------------------------------------------------------------

| Message:     Unable to instantiate Crypto class; nested exception is: 

java.lang.NullPointerException; nested exception is: 

org.apache.ws.security.WSSecurityException: Unable to instantiate Crypto class; nested exception is: 

java.lang.NullPointerException

----------------------------------------------------------------------------

| Trapped Exception: Unable to instantiate Crypto class; nested exception is: 

java.lang.NullPointerException; nested exception is: 

org.apache.ws.security.WSSecurityException: Unable to instantiate Crypto class; nested exception is: 

java.lang.NullPointerException

| Trapped Message:   Unable to instantiate Crypto class; nested exception is: 

java.lang.NullPointerException; nested exception is: 

org.apache.ws.security.WSSecurityException: Unable to instantiate Crypto class; nested exception is: 

java.lang.NullPointerException

----------------------------------------------------------------------------

STACK TRACE

AxisFault

 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException

 faultSubcode: 

 faultString: Unable to instantiate Crypto class; nested exception is: 

java.lang.NullPointerException; nested exception is: 

org.apache.ws.security.WSSecurityException: Unable to instantiate Crypto class; nested exception is: 

java.lang.NullPointerException

 faultActor: 

 faultNode: 

 faultDetail: 

{http://xml.apache.org/axis/}hostname:lvqma1033.phx.aexp.com


Unable to instantiate Crypto class; nested exception is: 

java.lang.NullPointerException; nested exception is: 

org.apache.ws.security.WSSecurityException: Unable to instantiate Crypto class; nested exception is: 

java.lang.NullPointerException

at org.apache.ws.axis.security.WSDoAllSender.invoke(WSDoAllSender.java:223)

at com.itko.lisa.dynexec.axis.WSS4JInfo$LisaDoAllSender.invoke(WSS4JInfo.java:2082)

at com.itko.lisa.dynexec.axis.ClientHandler.invoke(ClientHandler.java:38)

at org.apache.axis.client.AxisClient.invoke(AxisClient.java:121)

at org.apache.axis.client.Call.invokeEngine(Call.java:2837)

at org.apache.axis.client.Call.invoke(Call.java:2820)

at com.itko.lisa.ws.nx.NxWSStep.executeCall(NxWSStep.java:384)

at com.itko.lisa.ws.nx.NxWSStep.execute(NxWSStep.java:289)

at com.itko.lisa.test.TestNode.executeNode(TestNode.java:984)

at com.itko.lisa.test.TestCase.execute(TestCase.java:1297)

at com.itko.lisa.test.TestCase.execute(TestCase.java:1198)

at com.itko.lisa.test.TestCase.executeNextNode(TestCase.java:1183)

at com.itko.lisa.test.TestCase.executeTest(TestCase.java:1124)

at com.itko.lisa.coordinator.Instance.run(Instance.java:208)

Caused by: org.apache.ws.security.WSSecurityException: Unable to instantiate Crypto class; nested exception is: 

java.lang.NullPointerException

at com.itko.lisa.dynexec.axis.WSS4JInfo$LisaDoAllSender.loadSignatureCrypto(WSS4JInfo.java:2125)

at org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:130)

at com.itko.lisa.dynexec.axis.WSS4JInfo$LisaDoAllSender.doSenderAction(WSS4JInfo.java:2092)

at org.apache.ws.axis.security.WSDoAllSender.invoke(WSDoAllSender.java:170)

... 13 more

Caused by: java.lang.NullPointerException

at java.util.Hashtable.put(Hashtable.java:460)

at com.itko.lisa.dynexec.axis.WSS4JInfo$LisaDoAllSender.loadSignatureCrypto(WSS4JInfo.java:2118)

... 16 more

============================================================================

Cause

This is cause due to incorrect path in for the of Keystore for Signature token under Security tab of Web Service step.

Environment

Release : 10.2

Component : CA Service Virtualization

Resolution

First copy the keystore file to an accessible location in Simulator machine.
Then change the path of Keystore for Signature token under Security tab to make sure it points to that location of simulator machine.
This will resolve the "Unable to instantiate Crypto class; nullpointer exception" exception.

Additional Information

After this error is resolved, if you get connection timeout error, make sure that the endpoint host is accessible from the Simulator machine on that port using Telnet command in Simulator machine.