Question

Getting "com.pega.pegarules.pub.PRException: Exception occurred while mapping incoming response to .response_POST.parts " while calling REST service

Hi All.

We are getting the below error when we try to consume the REST service,

[8/23/18 15:48:35:413 EDT] 00000086 SystemOut     O 2018-08-23 15:48:35,200 [     TP_http : 59012] [  STANDARD] [                    ] [XXXX:01.02.06] (ngineinterface.service.HttpAPI) ERROR | com.pega.pegarules.pub.PRRuntimeError
com.pega.pegarules.pub.PRRuntimeError: PRRuntimeError
	at com.pega.pegarules.session.internal.mgmt.base.ThreadRunner.runActivitiesAlt(ThreadRunner.java:712) ~[prprivate.jar:?]
	at com.pega.pegarules.session.internal.mgmt.PRThreadImpl.runActivitiesAlt(PRThreadImpl.java:481) ~[prprivate.jar:?]
	at com.pega.pegarules.session.internal.engineinterface.service.HttpAPI.runActivities(HttpAPI.java:3414) ~[prprivate.jar:?]
	at com.pega.pegarules.session.external.engineinterface.service.EngineAPI.processRequestInner(EngineAPI.java:399) ~[prenginext.jar:?]
	at sun.reflect.GeneratedMethodAccessor116.invoke(Unknown Source) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55) ~[?:1.8.0-internal]
	at java.lang.reflect.Method.invoke(Method.java:507) ~[?:2.6 (02-10-2016)]
	at com.pega.pegarules.session.internal.PRSessionProviderImpl.performTargetActionWithLock(PRSessionProviderImpl.java:1338) ~[prprivate.jar:?]
	at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:1075) ~[prprivate.jar:?]
	at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:930) ~[prprivate.jar:?]
	at com.pega.pegarules.session.external.engineinterface.service.EngineAPI.processRequest(EngineAPI.java:336) ~[prenginext.jar:?]
	at com.pega.pegarules.session.internal.engineinterface.service.HttpAPI.invoke(HttpAPI.java:854) ~[prprivate.jar:?]
	at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl._invokeEngine_privact(EngineImpl.java:331) ~[prprivate.jar:?]
	at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl.invokeEngine(EngineImpl.java:274) ~[prprivate.jar:?]
	at com.pega.pegarules.session.internal.engineinterface.etier.ejb.EngineBean.invokeEngine(EngineBean.java:225) ~[prprivate.jar:?]
	at sun.reflect.GeneratedMethodAccessor81.invoke(Unknown Source) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55) ~[?:1.8.0-internal]
	at java.lang.reflect.Method.invoke(Method.java:507) ~[?:2.6 (02-10-2016)]
	at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:370) ~[prbootstrap-7.3.0-77.jar:7.3.0-77]
	at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingThrowable(PRBootstrap.java:411) ~[prbootstrap-7.3.0-77.jar:7.3.0-77]
	at com.pega.pegarules.boot.internal.extbridge.AppServerBridgeToPega.invokeMethodPropagatingThrowable(AppServerBridgeToPega.java:224) ~[prbootstrap-api-7.3.0-77.jar:7.3.0-77]
	at com.pega.pegarules.boot.internal.extbridge.AppServerBridgeToPega.invokeMethodPropagatingException(AppServerBridgeToPega.java:246) ~[prbootstrap-api-7.3.0-77.jar:7.3.0-77]
	at com.pega.pegarules.internal.etier.ejb.EngineBeanBoot.invokeEngine(EngineBeanBoot.java:168) ~[prbeans.jar:7.3.0-77]
	at com.pega.pegarules.internal.etier.interfaces.EJSLocalStatelessEngineBMT_f2439d86.invokeEngine(Unknown Source) ~[prbeans.jar:7.3.0-77]
	at com.pega.pegarules.priv.context.JNDIEnvironment.invokeEngineInner(JNDIEnvironment.java:278) ~[prpublic.jar:?]
	at com.pega.pegarules.priv.context.JNDIEnvironment.invokeEngine(JNDIEnvironment.java:223) ~[prpublic.jar:?]
	at com.pega.pegarules.web.impl.WebStandardImpl.makeEtierRequest(WebStandardImpl.java:678) ~[prwebj2ee.jar:?]
	at com.pega.pegarules.web.impl.WebStandardImpl.doPost(WebStandardImpl.java:394) ~[prwebj2ee.jar:?]
	at sun.reflect.GeneratedMethodAccessor115.invoke(Unknown Source) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55) ~[?:1.8.0-internal]
	at java.lang.reflect.Method.invoke(Method.java:507) ~[?:2.6 (02-10-2016)]
	at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:370) ~[prbootstrap-7.3.0-77.jar:7.3.0-77]
	at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingThrowable(PRBootstrap.java:411) ~[prbootstrap-7.3.0-77.jar:7.3.0-77]
	at com.pega.pegarules.boot.internal.extbridge.AppServerBridgeToPega.invokeMethodPropagatingThrowable(AppServerBridgeToPega.java:224) ~[prbootstrap-api-7.3.0-77.jar:7.3.0-77]
	at com.pega.pegarules.boot.internal.extbridge.AppServerBridgeToPega.invokeMethod(AppServerBridgeToPega.java:273) ~[prbootstrap-api-7.3.0-77.jar:7.3.0-77]
	at com.pega.pegarules.internal.web.servlet.WebStandardBoot.doPost(WebStandardBoot.java:121) ~[prbootstrap-api-7.3.0-77.jar:7.3.0-77]
	at com.pega.pegarules.internal.web.servlet.WebStandardBoot.doGet(WebStandardBoot.java:92) ~[prbootstrap-api-7.3.0-77.jar:7.3.0-77]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:575) ~[javax.j2ee.servlet.jar:?]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:668) ~[javax.j2ee.servlet.jar:?]
	at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1232) ~[com.ibm.ws.webcontainer.jar:?]
	at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:781) ~[com.ibm.ws.webcontainer.jar:?]
	at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:480) ~[com.ibm.ws.webcontainer.jar:?]
	at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178) ~[com.ibm.ws.webcontainer.jar:?]
	at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1114) ~[com.ibm.ws.webcontainer.jar:?]
	at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3928) ~[com.ibm.ws.webcontainer.jar:?]
	at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304) ~[com.ibm.ws.webcontainer.jar:?]
	at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1007) ~[com.ibm.ws.webcontainer.jar:?]
	at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1817) ~[com.ibm.ws.webcontainer.jar:?]
	at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:200) ~[com.ibm.ws.webcontainer.jar:?]
	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:463) ~[com.ibm.ws.runtime.jar:?]
	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:530) ~[com.ibm.ws.runtime.jar:?]
	at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:316) ~[com.ibm.ws.runtime.jar:?]
	at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:88) ~[com.ibm.ws.runtime.jar:?]
	at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1820) ~[com.ibm.ws.runtime.jar:?]
	at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175) ~[com.ibm.ws.runtime.jar:?]
	at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) ~[com.ibm.ws.runtime.jar:?]
	at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161) ~[com.ibm.ws.runtime.jar:?]
	at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138) ~[com.ibm.ws.runtime.jar:?]
	at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204) ~[com.ibm.ws.runtime.jar:?]
	at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:816) ~[com.ibm.ws.runtime.jar:?]
	at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905) ~[com.ibm.ws.runtime.jar:?]
	at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1881) ~[com.ibm.ws.runtime.jar:?]
Caused by: com.pega.pegarules.pub.services.InboundMappingException: Exception occurred while mapping incoming response to .response_POST.parts 
	at com.pega.pegarules.integration.engine.internal.util.PRServiceUtils.mapInboundData(PRServiceUtils.java:1295) ~[printegrint.jar:?]
	at com.pega.pegarules.integration.engine.internal.connect.rest.RESTConnector.mapResponseBody(RESTConnector.java:1845) ~[printegrint.jar:?]
	at com.pega.pegarules.integration.engine.internal.connect.rest.RESTConnector.executeRequest(RESTConnector.java:2013) ~[printegrint.jar:?]
	at com.pega.pegarules.integration.engine.internal.connect.rest.RESTConnector.perform(RESTConnector.java:413) ~[printegrint.jar:?]
	at com.pega.pegarules.integration.engine.internal.connect.rest.RESTConnector.invoke(RESTConnector.java:256) ~[printegrint.jar:?]
	at com.pega.pegarules.integration.config.internal.connect.PRConnectorFactory.invokeConnector(PRConnectorFactory.java:82) ~[printegrint.jar:?]
	at com.pega.pegarules.integration.engine.internal.util.PRConnectorUtilsPriv.invokeConnector(PRConnectorUtilsPriv.java:168) ~[printegrint.jar:?]
	at com.pega.pegarules.session.internal.mgmt.Executable.invokeConnector(Executable.java:11392) ~[prprivate.jar:?]
	at com.pegarules.generated.activity.ra_action_pyinvokerestconnector_b52c161733c13a95270b391bad11b998.step1_circum0(ra_action_pyinvokerestconnector_b52c161733c13a95270b391bad11b998.java:164) ~[?:?]
	at com.pegarules.generated.activity.ra_action_pyinvokerestconnector_b52c161733c13a95270b391bad11b998.perform(ra_action_pyinvokerestconnector_b52c161733c13a95270b391bad11b998.java:70) ~[?:?]
	at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3597) ~[prprivate.jar:?]
	at com.pegarules.generated.activity.ra_action_invoke_adde9d91fce1256a22f0ed90194a2db1.step7_circum0(ra_action_invoke_adde9d91fce1256a22f0ed90194a2db1.java:1001) ~[?:?]
	at com.pegarules.generated.activity.ra_action_invoke_adde9d91fce1256a22f0ed90194a2db1.perform(ra_action_invoke_adde9d91fce1256a22f0ed90194a2db1.java:173) ~[?:?]
	at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3597) ~[prprivate.jar:?]
	at com.pegarules.generated.activity.sh_action_retrievepartinformationwings_b01c91daac35cb17077af5989bff2762.step3_circum0(sh_action_retrievepartinformationwings_b01c91daac35cb17077af5989bff2762.java:388) ~[?:?]
	at com.pegarules.generated.activity.sh_action_retrievepartinformationwings_b01c91daac35cb17077af5989bff2762.perform(sh_action_retrievepartinformationwings_b01c91daac35cb17077af5989bff2762.java:119) ~[?:?]
	at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3597) ~[prprivate.jar:?]
	at com.pega.pegarules.session.internal.mgmt.Executable.doAction(Executable.java:3330) ~[prprivate.jar:?]
	at com.pegarules.generated.activity.ra_action_pyrunrecordexecute_f7d1e1c1513eef165c7ecbe136f3addd.step2_circum0(ra_action_pyrunrecordexecute_f7d1e1c1513eef165c7ecbe136f3addd.java:249) ~[?:?]
	at com.pegarules.generated.activity.ra_action_pyrunrecordexecute_f7d1e1c1513eef165c7ecbe136f3addd.perform(ra_action_pyrunrecordexecute_f7d1e1c1513eef165c7ecbe136f3addd.java:88) ~[?:?]
	at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3597) ~[prprivate.jar:?]
	at com.pega.pegarules.session.internal.mgmt.Executable.invokeActivity(Executable.java:10845) ~[prprivate.jar:?]
	at com.pegarules.generated.activity.ra_action_pzrunrecordexecute_c38281e0bb63f7c4aab88814460c8435.step11_circum0(ra_action_pzrunrecordexecute_c38281e0bb63f7c4aab88814460c8435.java:1027) ~[?:?]
	at com.pegarules.generated.activity.ra_action_pzrunrecordexecute_c38281e0bb63f7c4aab88814460c8435.perform(ra_action_pzrunrecordexecute_c38281e0bb63f7c4aab88814460c8435.java:246) ~[?:?]
	at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3597) ~[prprivate.jar:?]
	at com.pega.pegarules.session.internal.mgmt.base.ThreadRunner.runActivitiesAlt(ThreadRunner.java:646) ~[prprivate.jar:?]
	... 61 more
Caused by: com.pega.pegarules.pub.PRException: Exception occurred while mapping incoming response to .response_POST.parts 
	at com.pega.pegarules.integration.engine.internal.JSONMappingUtils.parseJSONArrayAsPageList(JSONMappingUtils.java:989) ~[printegrint.jar:?]
	at com.pega.pegarules.integration.engine.internal.JSONMappingUtils.setInboundJsonValue(JSONMappingUtils.java:154) ~[printegrint.jar:?]
	at com.pega.pegarules.integration.engine.internal.ServiceMappingUtils.setInboundDataValue(ServiceMappingUtils.java:895) ~[printegrint.jar:?]
	at com.pega.pegarules.integration.engine.internal.ServiceMappingUtils.mapInboundData(ServiceMappingUtils.java:744) ~[printegrint.jar:?]
	at com.pega.pegarules.integration.engine.internal.util.PRServiceUtils.mapInboundData(PRServiceUtils.java:1287) ~[printegrint.jar:?]
	at com.pega.pegarules.integration.engine.internal.connect.rest.RESTConnector.mapResponseBody(RESTConnector.java:1845) ~[printegrint.jar:?]
	at com.pega.pegarules.integration.engine.internal.connect.rest.RESTConnector.executeRequest(RESTConnector.java:2013) ~[printegrint.jar:?]
	at com.pega.pegarules.integration.engine.internal.connect.rest.RESTConnector.perform(RESTConnector.java:413) ~[printegrint.jar:?]
	at com.pega.pegarules.integration.engine.internal.connect.rest.RESTConnector.invoke(RESTConnector.java:256) ~[printegrint.jar:?]
	at com.pega.pegarules.integration.config.internal.connect.PRConnectorFactory.invokeConnector(PRConnectorFactory.java:82) ~[printegrint.jar:?]
	at com.pega.pegarules.integration.engine.internal.util.PRConnectorUtilsPriv.invokeConnector(PRConnectorUtilsPriv.java:168) ~[printegrint.jar:?]
	at com.pega.pegarules.session.internal.mgmt.Executable.invokeConnector(Executable.java:11392) ~[prprivate.jar:?]
	at com.pegarules.generated.activity.ra_action_pyinvokerestconnector_b52c161733c13a95270b391bad11b998.step1_circum0(ra_action_pyinvokerestconnector_b52c161733c13a95270b391bad11b998.java:164) ~[?:?]
	at com.pegarules.generated.activity.ra_action_pyinvokerestconnector_b52c161733c13a95270b391bad11b998.perform(ra_action_pyinvokerestconnector_b52c161733c13a95270b391bad11b998.java:70) ~[?:?]
	at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3597) ~[prprivate.jar:?]
	at com.pegarules.generated.activity.ra_action_invoke_adde9d91fce1256a22f0ed90194a2db1.step7_circum0(ra_action_invoke_adde9d91fce1256a22f0ed90194a2db1.java:1001) ~[?:?]
	at com.pegarules.generated.activity.ra_action_invoke_adde9d91fce1256a22f0ed90194a2db1.perform(ra_action_invoke_adde9d91fce1256a22f0ed90194a2db1.java:173) ~[?:?]
	at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3597) ~[prprivate.jar:?]
	at com.pegarules.generated.activity.sh_action_retrievepartinformationwings_b01c91daac35cb17077af5989bff2762.step3_circum0(sh_action_retrievepartinformationwings_b01c91daac35cb17077af5989bff2762.java:388) ~[?:?]
	at com.pegarules.generated.activity.sh_action_retrievepartinformationwings_b01c91daac35cb17077af5989bff2762.perform(sh_action_retrievepartinformationwings_b01c91daac35cb17077af5989bff2762.java:119) ~[?:?]
	at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3597) ~[prprivate.jar:?]
	at com.pega.pegarules.session.internal.mgmt.Executable.doAction(Executable.java:3330) ~[prprivate.jar:?]
	at com.pegarules.generated.activity.ra_action_pyrunrecordexecute_f7d1e1c1513eef165c7ecbe136f3addd.step2_circum0(ra_action_pyrunrecordexecute_f7d1e1c1513eef165c7ecbe136f3addd.java:249) ~[?:?]
	at com.pegarules.generated.activity.ra_action_pyrunrecordexecute_f7d1e1c1513eef165c7ecbe136f3addd.perform(ra_action_pyrunrecordexecute_f7d1e1c1513eef165c7ecbe136f3addd.java:88) ~[?:?]
	at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3597) ~[prprivate.jar:?]
	at com.pega.pegarules.session.internal.mgmt.Executable.invokeActivity(Executable.java:10845) ~[prprivate.jar:?]
	at com.pegarules.generated.activity.ra_action_pzrunrecordexecute_c38281e0bb63f7c4aab88814460c8435.step11_circum0(ra_action_pzrunrecordexecute_c38281e0bb63f7c4aab88814460c8435.java:1027) ~[?:?]
	at com.pegarules.generated.activity.ra_action_pzrunrecordexecute_c38281e0bb63f7c4aab88814460c8435.perform(ra_action_pzrunrecordexecute_c38281e0bb63f7c4aab88814460c8435.java:246) ~[?:?]
	at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3597) ~[prprivate.jar:?]
	at com.pega.pegarules.session.internal.mgmt.base.ThreadRunner.runActivitiesAlt(ThreadRunner.java:646) ~[prprivate.jar:?]
	... 61 more

We have page and we are mapping through data transform. Did anyone faced this issue, we are using 7.3.1.

Regards,

Anandh

***Edited by Moderator Marissa to update platform capability tags****

Correct Answer
August 31, 2018 - 10:50am

Hi All,

Issue is resolved, after we pass the cookie in our header. 

Regards,

Anandh

Comments

Keep up to date on this post and subscribe to comments

August 27, 2018 - 2:14am

Hello Anandh, 

Could you share the implementation screenshot to know the issue more clearly? 

August 31, 2018 - 10:50am
Response to Naveen_Naanu

Hi All,

Issue is resolved, after we pass the cookie in our header. 

Regards,

Anandh

January 17, 2019 - 9:57pm

Hello Anandh, 

Could please let us know how cookie was passed in header.