Dear Technical Support Team,
I am struggling with following error. Wishing to get explanation as well as alternative approaches from you.
Axonivy Engine: 8.0.8
Context:
While handling a Rest API request, it calls webservice (which is defined in a sub process) multiple times (the number of times is depended on size of items in the Rest request):
Code to call Sub Process:
SubProcessCall.withPath("subProcessPath")
.withStart("startCallWebservice", ARequest.class)
.withParam("document", document)
.call()
.first(AResponse.class);
Observation:
Once there is a failure in calling webservice, later requests to webservice will be failed as well. All the requests use the same instance of org.apache.cxf.endpoint.ClientImpl.
[update: 2022-12-06] after revisit this, I found out that I put breakpoint on a lamda expression, so that it hit two times.
Error stack trace:
java.lang.NullPointerException
at org.apache.cxf.endpoint.ClientImpl.setResponseContext(ClientImpl.java:288)
at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:545)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:441)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:356)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:314)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:334)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:320)
at ch.ivyteam.ivy.webservice.exec.cxf.WebServiceClientCallCXF.invokeWebService(WebServiceClientCallCXF.java:92)
at ch.ivyteam.ivy.webservice.exec.cxf.WebServiceClientCallCXF.lambda$0(WebServiceClientCallCXF.java:70)
at ch.ivyteam.ivy.webservice.exec.cxf.WebServiceClientCallCXF.withCookies(WebServiceClientCallCXF.java:82)
at ch.ivyteam.ivy.webservice.exec.cxf.WebServiceClientCallCXF.execute(WebServiceClientCallCXF.java:71)
at ch.ivyteam.ivy.bpm.exec.internal.activity.webservicecall.WebServiceCallRequest.lambda$1(WebServiceCallRequest.java:116)
at ch.ivyteam.ivy.bpm.exec.internal.activity.webservicecall.WebServiceCallRequest.withStopWatch(WebServiceCallRequest.java:134)
at ch.ivyteam.ivy.bpm.exec.internal.activity.webservicecall.WebServiceCallRequest.executeCalls(WebServiceCallRequest.java:116)
at ch.ivyteam.ivy.bpm.exec.internal.activity.webservicecall.WebServiceCallRequest.execute(WebServiceCallRequest.java:90)
at ch.ivyteam.ivy.bpm.exec.internal.activity.webservicecall.WebServiceCallRequest.executeWebServiceCall(WebServiceCallRequest.java:61)
at ch.ivyteam.ivy.bpm.exec.internal.activity.webservicecall.WebserviceCallBackgroundOperation.execute(WebserviceCallBackgroundOperation.java:63)
at ch.ivyteam.ivy.bpm.engine.internal.background.wrapper.BackgroundOperationWrapper.execute(BackgroundOperationWrapper.java:24)
at ch.ivyteam.ivy.bpm.engine.internal.background.wrapper.ExecuteBackgroundOperationInRequestThreadContextWrapper.execute(ExecuteBackgroundOperationInRequestThreadContextWrapper.java:26)
at ch.ivyteam.ivy.bpm.engine.internal.background.BackgroundTask.call(BackgroundTask.java:40)
at ch.ivyteam.ivy.bpm.engine.internal.background.BackgroundTask.call(BackgroundTask.java:1)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Kindly regards,
Khanh