Question
State Farm Insurance
US
Last activity: 23 Sep 2015 12:57 EDT
Getting a classCastException from connect-REST, mapping from a json where there is a pagelist property
Created a connect-REST rule, in PRPC 7.1.7, using the integration wizard that maps the _GET from a Json. In the json opbject, is a property ("staffmember"), that is a page-list. However if only one entry(staffmember) comes thru, I get a classCastExpection. Yet multiple staffmembers under that property/page-list work fine. I've interrogated the json, and its is defined the same if there is one or multiple staffmembers in the object.
Now, originally, PRPC created the "staffmember" property rule as a page. So the connect-Rest would fail on any calls where the json returned more than one staffmember. (a mapping error, i forget now) So, i opened the ruleset, deleted the rule, recreated it as a page-list. Based on this, i'm wondering if there is something in the rules DB that i'm needing to clear or delete. We have deleted exptemp and recycled the server to no avail.
There are other properties created as a page-lists, however I can't be sure if they fail under 1 entry either, as I don't own that data.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Updated: 23 Sep 2015 12:57 EDT
Pegasystems Inc.
US
know issue with JSON arrays who have single elements. The response coming back has to have been correctly assembled whether the array has multiple elements or not.
Two good links on this :
PEG
IN
In which format are you passing the request to json? Is it GET/POST request?
PageList we need to send the request as below. Example for POST request input for pagelist property.
[{"staffmember","Test"}]
Please share the stacktrace also.
Accepted Solution
Updated: 23 Sep 2015 12:57 EDT
Pegasystems Inc.
US
know issue with JSON arrays who have single elements. The response coming back has to have been correctly assembled whether the array has multiple elements or not.
Two good links on this :
State Farm Insurance
US
In the GET request.
This is only part of the entire JSON:
Multiple staff members:
"staffMembers":{"staffMember":[{"alias":"xxxx","caption":"","memberName":"Name LName","title":"Office Representative","license":"10xx","associd":"XBWKAK"},{"alias":"yyyy","caption":"","memberName":"Her Name","title":"","license":"8c0v56","associd":"00"}]}
single staff member:
"staffMembers":{"staffMember":{"alias":"zzzz","caption":"","memberName":"HIs Name","title":"","license":"9b78","associd":"0"}}
State Farm Insurance
US
Stack Trace:
2015-09-23 09:37:57,975 [ WebContainer : 11] [ STANDARD] [ R21280:01.01] (ector.Rule_Connect_REST.Action) INFO J30K-A4 - Starting remote service invocation...
2015-09-23 09:37:58,022 [ WebContainer : 11] [ STANDARD] [ R21280:01.01] (ector.Rule_Connect_REST.Action) INFO J30K-A4 - Adding outbound header values to HTTP request
2015-09-23 09:37:58,392 [ WebContainer : 11] [ STANDARD] [ R21280:01.01] (ector.Rule_Connect_REST.Action) INFO J30K-A4 - HTTP Status code: 200
2015-09-23 09:37:58,406 [ WebContainer : 11] [ STANDARD] [ R21280:01.01] (ector.Rule_Connect_REST.Action) INFO J30K-A4 - Reading HTTP response message data
2015-09-23 09:38:01,279 [ WebContainer : 11] [ STANDARD] [ R21280:01.01] ( internal.mgmt.Executable) ERROR J30K-A4 - Exception
com.pega.pegarules.pub.services.InboundMappingException: Error mapping incoming response to .response_GET: java.lang.ClassCastException: java.util.LinkedHashMap incompatible with java.util.List
at com.pega.pegarules.integration.engine.internal.util.PRServiceUtils.mapInboundData(PRServiceUtils.java:1267)
at com.pegarules.generated.activity.ra_action_pyinvokerestconnector_eb7dafe6dac00116b03b951c8add1e9a.step12_circum0(ra_action_pyinvokerestconnector_eb7dafe6dac00116b03b951c8add1e9a.java:2815)
Stack Trace:
2015-09-23 09:37:57,975 [ WebContainer : 11] [ STANDARD] [ R21280:01.01] (ector.Rule_Connect_REST.Action) INFO J30K-A4 - Starting remote service invocation...
2015-09-23 09:37:58,022 [ WebContainer : 11] [ STANDARD] [ R21280:01.01] (ector.Rule_Connect_REST.Action) INFO J30K-A4 - Adding outbound header values to HTTP request
2015-09-23 09:37:58,392 [ WebContainer : 11] [ STANDARD] [ R21280:01.01] (ector.Rule_Connect_REST.Action) INFO J30K-A4 - HTTP Status code: 200
2015-09-23 09:37:58,406 [ WebContainer : 11] [ STANDARD] [ R21280:01.01] (ector.Rule_Connect_REST.Action) INFO J30K-A4 - Reading HTTP response message data
2015-09-23 09:38:01,279 [ WebContainer : 11] [ STANDARD] [ R21280:01.01] ( internal.mgmt.Executable) ERROR J30K-A4 - Exception
com.pega.pegarules.pub.services.InboundMappingException: Error mapping incoming response to .response_GET: java.lang.ClassCastException: java.util.LinkedHashMap incompatible with java.util.List
at com.pega.pegarules.integration.engine.internal.util.PRServiceUtils.mapInboundData(PRServiceUtils.java:1267)
at com.pegarules.generated.activity.ra_action_pyinvokerestconnector_eb7dafe6dac00116b03b951c8add1e9a.step12_circum0(ra_action_pyinvokerestconnector_eb7dafe6dac00116b03b951c8add1e9a.java:2815)
at com.pegarules.generated.activity.ra_action_pyinvokerestconnector_eb7dafe6dac00116b03b951c8add1e9a.perform(ra_action_pyinvokerestconnector_eb7dafe6dac00116b03b951c8add1e9a.java:260)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3500)
at com.pegarules.generated.activity.ra_action_invoke_6a91441c4f6e5048b63360383ae1b952.step7_circum0(ra_action_invoke_6a91441c4f6e5048b63360383ae1b952.java:1002)
at com.pegarules.generated.activity.ra_action_invoke_6a91441c4f6e5048b63360383ae1b952.perform(ra_action_invoke_6a91441c4f6e5048b63360383ae1b952.java:172)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3500)
at com.pegarules.generated.activity.ra_action_performresourcerestconnection_bec425fe7711ebc6b8e22f129b084920.step1_circum0(ra_action_performresourcerestconnection_bec425fe7711ebc6b8e22f129b084920.java:240)
at com.pegarules.generated.activity.ra_action_performresourcerestconnection_bec425fe7711ebc6b8e22f129b084920.perform(ra_action_performresourcerestconnection_bec425fe7711ebc6b8e22f129b084920.java:70)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3500)
at com.pega.pegarules.session.internal.mgmt.Executable.invokeActivity(Executable.java:10521)
at com.pegarules.generated.activity.ra_action_invokerestconnection_a0a2ebf65bf77e7e7967348064bb8c1e.step3_circum0(ra_action_invokerestconnection_a0a2ebf65bf77e7e7967348064bb8c1e.java:243)
at com.pegarules.generated.activity.ra_action_invokerestconnection_a0a2ebf65bf77e7e7967348064bb8c1e.perform(ra_action_invokerestconnection_a0a2ebf65bf77e7e7967348064bb8c1e.java:96)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3500)
at com.pega.pegarules.session.internal.mgmt.Executable.invokeActivity(Executable.java:10521)
at com.pegarules.generated.activity.ra_action_retrieveagentinfo_9131f4e21e59f8029da7cad0117edcac.step2_circum0(ra_action_retrieveagentinfo_9131f4e21e59f8029da7cad0117edcac.java:205)
at com.pegarules.generated.activity.ra_action_retrieveagentinfo_9131f4e21e59f8029da7cad0117edcac.perform(ra_action_retrieveagentinfo_9131f4e21e59f8029da7cad0117edcac.java:69)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3500)
at com.pega.pegarules.session.internal.mgmt.Executable.invokeActivity(Executable.java:10521)
at com.pegarules.generated.activity.ra_action_preprocessingagentinfo_8bee1b26875ffa9b8bf9f10f10a24a26.step1_circum0(ra_action_preprocessingagentinfo_8bee1b26875ffa9b8bf9f10f10a24a26.java:202)
at com.pegarules.generated.activity.ra_action_preprocessingagentinfo_8bee1b26875ffa9b8bf9f10f10a24a26.perform(ra_action_preprocessingagentinfo_8bee1b26875ffa9b8bf9f10f10a24a26.java:69)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3500)
at com.pegarules.generated.callActivity_071017_xvj4o_pyNDBZ4Gy293rekg.callActivity07_10_17(callActivity_071017_xvj4o_pyNDBZ4Gy293rekg.java:122)
at com.pegarules.generated.callActivity_071017_xvj4o_pyNDBZ4Gy293rekg.invoke(callActivity_071017_xvj4o_pyNDBZ4Gy293rekg.java:82)
at com.pega.pegarules.generation.internal.library.LibraryRuntime.resolveAndinvokeFunctionViaReflection(LibraryRuntime.java:133)
at com.pega.pegarules.generation.internal.library.LibraryRuntime.invokeLibraryRuntime(LibraryRuntime.java:110)
at com.pega.pegarules.session.internal.mgmt.Executable.invokeLibraryRuntime(Executable.java:8954)
at com.pega.pegarules.priv.generator.LibrarySupport.resolveAndInvokeFunctionViaReflection(LibrarySupport.java:181)
at com.pegarules.generated.pega_rules_utilities.callActivity(pega_rules_utilities.java:1619)
at com.pegarules.generated.flowaction.ra_action_agentinfoview_9aaa9ec9221251a4889d574970b486f0.RunFlowActionActivity_circum0(ra_action_agentinfoview_9aaa9ec9221251a4889d574970b486f0.java:323)
at com.pegarules.generated.flowaction.ra_action_agentinfoview_9aaa9ec9221251a4889d574970b486f0.perform(ra_action_agentinfoview_9aaa9ec9221251a4889d574970b486f0.java:72)
at com.pega.pegarules.session.internal.mgmt.Executable.doAction(Executable.java:3305)
at com.pegarules.generated.activity.ra_action_runflowactionactivity_58efc1b6f854c94714f657cadaebe7ff.step3_circum0(ra_action_runflowactionactivity_58efc1b6f854c94714f657cadaebe7ff.java:383)
at com.pegarules.generated.activity.ra_action_runflowactionactivity_58efc1b6f854c94714f657cadaebe7ff.perform(ra_action_runflowactionactivity_58efc1b6f854c94714f657cadaebe7ff.java:103)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3500)
at com.pega.pegarules.session.internal.mgmt.Executable.invokeActivity(Executable.java:10521)
at com.pegarules.generated.activity.ra_action_performpreprocessing_09a325f67bf9b651644b077408ec0712.step10_circum0(ra_action_performpreprocessing_09a325f67bf9b651644b077408ec0712.java:925)
at com.pegarules.generated.activity.ra_action_performpreprocessing_09a325f67bf9b651644b077408ec0712.perform(ra_action_performpreprocessing_09a325f67bf9b651644b077408ec0712.java:244)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3500)
at com.pegarules.generated.html_section.ra_stream_sfflowactionhtml_simple_0f52d88b1335b4eb179ff9d678e56b74.execute(ra_stream_sfflowactionhtml_simple_0f52d88b1335b4eb179ff9d678e56b74.java:117)
at com.pega.pegarules.session.internal.mgmt.StreamBuilderTools.appendStreamKeepProperties(StreamBuilderTools.java:717)
at com.pega.pegarules.session.internal.mgmt.autostreams.IncludeStreamRuntime.getStream(IncludeStreamRuntime.java:332)
at com.pega.pegarules.session.internal.mgmt.autostreams.IncludeStreamRuntime.emitIncludeStreamReference(IncludeStreamRuntime.java:252)
at com.pega.pegarules.session.internal.mgmt.autostreams.AutoStreamRuntimeImpl.emitIncludeStreamReference(AutoStreamRuntimeImpl.java:358)
at com.pegarules.generated.html_section.ra_stream_navigationframework_60c7990b17184a0ade12237946d23f6a.sectionBodyIncludeInCell_1(ra_stream_navigationframework_60c7990b17184a0ade12237946d23f6a.java:262)
at com.pegarules.generated.html_section.ra_stream_navigationframework_60c7990b17184a0ade12237946d23f6a.sectionIncludeInCell_SFFlowActionHTML_Simple_1(ra_stream_navigationframework_60c7990b17184a0ade12237946d23f6a.java:236)
at com.pegarules.generated.html_section.ra_stream_navigationframework_60c7990b17184a0ade12237946d23f6a.layoutBody_1(ra_stream_navigationframework_60c7990b17184a0ade12237946d23f6a.java:383)
at com.pegarules.generated.html_section.ra_stream_navigationframework_60c7990b17184a0ade12237946d23f6a.pzLayoutBodyWrapper_1(ra_stream_navigationframework_60c7990b17184a0ade12237946d23f6a.java:225)
at com.pegarules.generated.html_section.ra_stream_navigationframework_60c7990b17184a0ade12237946d23f6a.pzLayout_1(ra_stream_navigationframework_60c7990b17184a0ade12237946d23f6a.java:390)
at com.pegarules.generated.html_section.ra_stream_navigationframework_60c7990b17184a0ade12237946d23f6a.pzSectionBody_1(ra_stream_navigationframework_60c7990b17184a0ade12237946d23f6a.java:212)
at com.pegarules.generated.html_section.ra_stream_navigationframework_60c7990b17184a0ade12237946d23f6a.execute(ra_stream_navigationframework_60c7990b17184a0ade12237946d23f6a.java:100)
at com.pega.pegarules.session.internal.mgmt.Executable.getStream(Executable.java:4033)
at com.pega.pegarules.session.internal.mgmt.autostreams.AutoStreamRuleRuntime.getSectionStream(AutoStreamRuleRuntime.java:149)
at com.pegarules.generated.html_harness.ra_stream_treenavigation_9d1846d42810e28f13c9fe5867d9a0b2.includeSectionBody_3(ra_stream_treenavigation_9d1846d42810e28f13c9fe5867d9a0b2.java:3600)
at com.pegarules.generated.html_harness.ra_stream_treenavigation_9d1846d42810e28f13c9fe5867d9a0b2.generatePegaHarnessDiv_6(ra_stream_treenavigation_9d1846d42810e28f13c9fe5867d9a0b2.java:1782)
at com.pegarules.generated.html_harness.ra_stream_treenavigation_9d1846d42810e28f13c9fe5867d9a0b2.execute(ra_stream_treenavigation_9d1846d42810e28f13c9fe5867d9a0b2.java:676)
at com.pega.pegarules.session.internal.mgmt.Executable.getStream(Executable.java:4033)
at com.pega.pegarules.session.internal.mgmt.Executable.getStream(Executable.java:3861)
at com.pegarules.generated.activity.ra_action_show_harness_3a715fceb3725b54f857d8327a1c5bba.step6_circum0(ra_action_show_harness_3a715fceb3725b54f857d8327a1c5bba.java:684)
at com.pegarules.generated.activity.ra_action_show_harness_3a715fceb3725b54f857d8327a1c5bba.perform(ra_action_show_harness_3a715fceb3725b54f857d8327a1c5bba.java:155)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3500)
at com.pega.pegarules.session.internal.mgmt.Executable.invokeActivity(Executable.java:10521)
at com.pegarules.generated.activity.ra_action_displayharness_1d414472711606645476be6f8133a69a.step2_circum0(ra_action_displayharness_1d414472711606645476be6f8133a69a.java:336)
at com.pegarules.generated.activity.ra_action_displayharness_1d414472711606645476be6f8133a69a.perform(ra_action_displayharness_1d414472711606645476be6f8133a69a.java:86)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3500)
at com.pega.pegarules.session.internal.mgmt.Executable.invokeActivity(Executable.java:10521)
at com.pegarules.generated.activity.ra_action_perform_b0b86ee90d82814cd7e3e5124876b4e1.step16_circum0(ra_action_perform_b0b86ee90d82814cd7e3e5124876b4e1.java:1211)
at com.pegarules.generated.activity.ra_action_perform_b0b86ee90d82814cd7e3e5124876b4e1.perform(ra_action_perform_b0b86ee90d82814cd7e3e5124876b4e1.java:352)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3500)
at com.pega.pegarules.session.internal.mgmt.Executable.invokeActivity(Executable.java:10521)
at com.pegarules.generated.activity.ra_action_gotoprevioustask_9fae697ae221236e1c8151e5eed4a8c1.step18_circum0(ra_action_gotoprevioustask_9fae697ae221236e1c8151e5eed4a8c1.java:1768)
at com.pegarules.generated.activity.ra_action_gotoprevioustask_9fae697ae221236e1c8151e5eed4a8c1.perform(ra_action_gotoprevioustask_9fae697ae221236e1c8151e5eed4a8c1.java:374)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3500)
at com.pega.pegarules.session.internal.mgmt.base.ThreadRunner.runActivitiesAlt(ThreadRunner.java:646)
at com.pega.pegarules.session.internal.mgmt.PRThreadImpl.runActivitiesAlt(PRThreadImpl.java:461)
at com.pega.pegarules.session.internal.engineinterface.service.HttpAPI.runActivities(HttpAPI.java:3322)
at com.pega.pegarules.session.external.engineinterface.service.EngineAPI.processRequestInner(EngineAPI.java:385)
at sun.reflect.GeneratedMethodAccessor179.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
at java.lang.reflect.Method.invoke(Method.java:620)
at com.pega.pegarules.session.internal.PRSessionProviderImpl.performTargetActionWithLock(PRSessionProviderImpl.java:1270)
at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:1008)
at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:841)
at com.pega.pegarules.session.external.engineinterface.service.EngineAPI.processRequest(EngineAPI.java:331)
at com.pega.pegarules.session.internal.engineinterface.service.HttpAPI.invoke(HttpAPI.java:850)
at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl._invokeEngine_privact(EngineImpl.java:315)
at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl.invokeEngine(EngineImpl.java:263)
at com.pega.pegarules.session.internal.engineinterface.etier.ejb.EngineBean.invokeEngine(EngineBean.java)
at sun.reflect.GeneratedMethodAccessor119.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
at java.lang.reflect.Method.invoke(Method.java:620)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:367)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingThrowable(PRBootstrap.java:408)
at com.pega.pegarules.boot.internal.extbridge.AppServerBridgeToPega.invokeMethodPropagatingThrowable(AppServerBridgeToPega.java:223)
at com.pega.pegarules.boot.internal.extbridge.AppServerBridgeToPega.invokeMethodPropagatingException(AppServerBridgeToPega.java:245)
at com.pega.pegarules.internal.etier.ejb.EngineBeanBoot.invokeEngine(EngineBeanBoot.java:168)
at com.pega.pegarules.internal.etier.interfaces.EJSLocalStatelessEngineBMT_f2439d86.invokeEngine(Unknown Source)
at com.pega.pegarules.priv.context.JNDIEnvironment.invokeEngineInner(JNDIEnvironment.java:278)
at com.pega.pegarules.priv.context.JNDIEnvironment.invokeEngine(JNDIEnvironment.java:223)
at com.pega.pegarules.web.impl.WebStandardImpl.makeEtierRequest(WebStandardImpl.java:574)
at com.pega.pegarules.web.impl.WebStandardImpl.doPost(WebStandardImpl.java:374)
at sun.reflect.GeneratedMethodAccessor164.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
at java.lang.reflect.Method.invoke(Method.java:620)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:367)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingThrowable(PRBootstrap.java:408)
at com.pega.pegarules.boot.internal.extbridge.AppServerBridgeToPega.invokeMethodPropagatingThrowable(AppServerBridgeToPega.java:223)
at com.pega.pegarules.boot.internal.extbridge.AppServerBridgeToPega.invokeMethod(AppServerBridgeToPega.java:272)
at com.pega.pegarules.internal.web.servlet.WebStandardBoot.doPost(WebStandardBoot.java:121)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at com.ibm.ws.cache.servlet.ServletWrapper.serviceProxied(ServletWrapper.java:307)
at com.ibm.ws.cache.servlet.CacheHook.handleFragment(CacheHook.java:562)
at com.ibm.ws.cache.servlet.CacheHook.handleServlet(CacheHook.java:255)
at com.ibm.ws.cache.servlet.ServletWrapper.service(ServletWrapper.java:259)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1230)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:779)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1114)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:87)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:919)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:200)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:463)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:530)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:316)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:88)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:816)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1881)
Caused by:
com.pega.pegarules.pub.PRException: Error mapping incoming response to .response_GET: java.lang.ClassCastException: java.util.LinkedHashMap incompatible with java.util.List
From: (H5342E6EF77140D20F7FC92489ECFB7C1:WPWD35JX.opr.statefarm.org)
at com.pega.pegarules.integration.engine.internal.ServiceHelper.setInboundJsonValue(ServiceHelper.java:1791)
at com.pega.pegarules.integration.engine.internal.ServiceHelper.setInboundDataValue(ServiceHelper.java:1594)
at com.pega.pegarules.integration.engine.internal.ServiceHelper.mapInboundData(ServiceHelper.java:1421)
at com.pega.pegarules.integration.engine.internal.util.PRServiceUtils.mapInboundData(PRServiceUtils.java:1259)
... 135 more
2015-09-23 09:38:01,281 [ WebContainer : 11] [ STANDARD] [ R21280:01.01] (nvoke.Rule_Connect_REST.Action) ERROR J30K-A4 - com.pega.pegarules.pub.services.InboundMappingException: Error mapping incoming response to .response_GET: java.lang.ClassCastException: java.util.LinkedHashMap incompatible with java.util.List
2015-09-23 09:38:01,281 [ WebContainer : 11] [ STANDARD] [ R21280:01.01] (nvoke.Rule_Connect_REST.Action) INFO J30K-A4 - Finished remote service invocation
2015-09-23 09:38:01,288 [ WebContainer : 11] [ STANDARD] [ R21280:01.01] ( internal.mgmt.Executable) ERROR J30K-A4 - Exception
com.pega.pegarules.pub.services.InboundMappingException: Error mapping incoming response to .response_GET: java.lang.ClassCastException: java.util.LinkedHashMap incompatible with java.util.List
at com.pega.pegarules.integration.engine.internal.util.PRServiceUtils.mapInboundData(PRServiceUtils.java:1267)
at com.pegarules.generated.activity.ra_action_pyinvokerestconnector_eb7dafe6dac00116b03b951c8add1e9a.step12_circum0(ra_action_pyinvokerestconnector_eb7dafe6dac00116b03b951c8add1e9a.java:2815)
at com.pegarules.generated.activity.ra_action_pyinvokerestconnector_eb7dafe6dac00116b03b951c8add1e9a.perform(ra_action_pyinvokerestconnector_eb7dafe6dac00116b03b951c8add1e9a.java:260)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3500)
at com.pegarules.generated.activity.ra_action_invoke_6a91441c4f6e5048b63360383ae1b952.step7_circum0(ra_action_invoke_6a91441c4f6e5048b63360383ae1b952.java:1002)
at com.pegarules.generated.activity.ra_action_invoke_6a91441c4f6e5048b63360383ae1b952.perform(ra_action_invoke_6a91441c4f6e5048b63360383ae1b952.java:172)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3500)
at com.pegarules.generated.activity.ra_action_performresourcerestconnection_bec425fe7711ebc6b8e22f129b084920.step1_circum0(ra_action_performresourcerestconnection_bec425fe7711ebc6b8e22f129b084920.java:240)
at com.pegarules.generated.activity.ra_action_performresourcerestconnection_bec425fe7711ebc6b8e22f129b084920.perform(ra_action_performresourcerestconnection_bec425fe7711ebc6b8e22f129b084920.java:70)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3500)
at com.pega.pegarules.session.internal.mgmt.Executable.invokeActivity(Executable.java:10521)
at com.pegarules.generated.activity.ra_action_invokerestconnection_a0a2ebf65bf77e7e7967348064bb8c1e.step3_circum0(ra_action_invokerestconnection_a0a2ebf65bf77e7e7967348064bb8c1e.java:243)
at com.pegarules.generated.activity.ra_action_invokerestconnection_a0a2ebf65bf77e7e7967348064bb8c1e.perform(ra_action_invokerestconnection_a0a2ebf65bf77e7e7967348064bb8c1e.java:96)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3500)
at com.pega.pegarules.session.internal.mgmt.Executable.invokeActivity(Executable.java:10521)
at com.pegarules.generated.activity.ra_action_retrieveagentinfo_9131f4e21e59f8029da7cad0117edcac.step2_circum0(ra_action_retrieveagentinfo_9131f4e21e59f8029da7cad0117edcac.java:205)
at com.pegarules.generated.activity.ra_action_retrieveagentinfo_9131f4e21e59f8029da7cad0117edcac.perform(ra_action_retrieveagentinfo_9131f4e21e59f8029da7cad0117edcac.java:69)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3500)
at com.pega.pegarules.session.internal.mgmt.Executable.invokeActivity(Executable.java:10521)
at com.pegarules.generated.activity.ra_action_preprocessingagentinfo_8bee1b26875ffa9b8bf9f10f10a24a26.step1_circum0(ra_action_preprocessingagentinfo_8bee1b26875ffa9b8bf9f10f10a24a26.java:202)
at com.pegarules.generated.activity.ra_action_preprocessingagentinfo_8bee1b26875ffa9b8bf9f10f10a24a26.perform(ra_action_preprocessingagentinfo_8bee1b26875ffa9b8bf9f10f10a24a26.java:69)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3500)
at com.pegarules.generated.callActivity_071017_xvj4o_pyNDBZ4Gy293rekg.callActivity07_10_17(callActivity_071017_xvj4o_pyNDBZ4Gy293rekg.java:122)
at com.pegarules.generated.callActivity_071017_xvj4o_pyNDBZ4Gy293rekg.invoke(callActivity_071017_xvj4o_pyNDBZ4Gy293rekg.java:82)
at com.pega.pegarules.generation.internal.library.LibraryRuntime.resolveAndinvokeFunctionViaReflection(LibraryRuntime.java:133)
at com.pega.pegarules.generation.internal.library.LibraryRuntime.invokeLibraryRuntime(LibraryRuntime.java:110)
at com.pega.pegarules.session.internal.mgmt.Executable.invokeLibraryRuntime(Executable.java:8954)
at com.pega.pegarules.priv.generator.LibrarySupport.resolveAndInvokeFunctionViaReflection(LibrarySupport.java:181)
at com.pegarules.generated.pega_rules_utilities.callActivity(pega_rules_utilities.java:1619)
at com.pegarules.generated.flowaction.ra_action_agentinfoview_9aaa9ec9221251a4889d574970b486f0.RunFlowActionActivity_circum0(ra_action_agentinfoview_9aaa9ec9221251a4889d574970b486f0.java:323)
at com.pegarules.generated.flowaction.ra_action_agentinfoview_9aaa9ec9221251a4889d574970b486f0.perform(ra_action_agentinfoview_9aaa9ec9221251a4889d574970b486f0.java:72)
at com.pega.pegarules.session.internal.mgmt.Executable.doAction(Executable.java:3305)
at com.pegarules.generated.activity.ra_action_runflowactionactivity_58efc1b6f854c94714f657cadaebe7ff.step3_circum0(ra_action_runflowactionactivity_58efc1b6f854c94714f657cadaebe7ff.java:383)
at com.pegarules.generated.activity.ra_action_runflowactionactivity_58efc1b6f854c94714f657cadaebe7ff.perform(ra_action_runflowactionactivity_58efc1b6f854c94714f657cadaebe7ff.java:103)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3500)
at com.pega.pegarules.session.internal.mgmt.Executable.invokeActivity(Executable.java:10521)
at com.pegarules.generated.activity.ra_action_performpreprocessing_09a325f67bf9b651644b077408ec0712.step10_circum0(ra_action_performpreprocessing_09a325f67bf9b651644b077408ec0712.java:925)
at com.pegarules.generated.activity.ra_action_performpreprocessing_09a325f67bf9b651644b077408ec0712.perform(ra_action_performpreprocessing_09a325f67bf9b651644b077408ec0712.java:244)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3500)
at com.pegarules.generated.html_section.ra_stream_sfflowactionhtml_simple_0f52d88b1335b4eb179ff9d678e56b74.execute(ra_stream_sfflowactionhtml_simple_0f52d88b1335b4eb179ff9d678e56b74.java:117)
at com.pega.pegarules.session.internal.mgmt.StreamBuilderTools.appendStreamKeepProperties(StreamBuilderTools.java:717)
at com.pega.pegarules.session.internal.mgmt.autostreams.IncludeStreamRuntime.getStream(IncludeStreamRuntime.java:332)
at com.pega.pegarules.session.internal.mgmt.autostreams.IncludeStreamRuntime.emitIncludeStreamReference(IncludeStreamRuntime.java:252)
at com.pega.pegarules.session.internal.mgmt.autostreams.AutoStreamRuntimeImpl.emitIncludeStreamReference(AutoStreamRuntimeImpl.java:358)
at com.pegarules.generated.html_section.ra_stream_navigationframework_60c7990b17184a0ade12237946d23f6a.sectionBodyIncludeInCell_1(ra_stream_navigationframework_60c7990b17184a0ade12237946d23f6a.java:262)
at com.pegarules.generated.html_section.ra_stream_navigationframework_60c7990b17184a0ade12237946d23f6a.sectionIncludeInCell_SFFlowActionHTML_Simple_1(ra_stream_navigationframework_60c7990b17184a0ade12237946d23f6a.java:236)
at com.pegarules.generated.html_section.ra_stream_navigationframework_60c7990b17184a0ade12237946d23f6a.layoutBody_1(ra_stream_navigationframework_60c7990b17184a0ade12237946d23f6a.java:383)
at com.pegarules.generated.html_section.ra_stream_navigationframework_60c7990b17184a0ade12237946d23f6a.pzLayoutBodyWrapper_1(ra_stream_navigationframework_60c7990b17184a0ade12237946d23f6a.java:225)
at com.pegarules.generated.html_section.ra_stream_navigationframework_60c7990b17184a0ade12237946d23f6a.pzLayout_1(ra_stream_navigationframework_60c7990b17184a0ade12237946d23f6a.java:390)
at com.pegarules.generated.html_section.ra_stream_navigationframework_60c7990b17184a0ade12237946d23f6a.pzSectionBody_1(ra_stream_navigationframework_60c7990b17184a0ade12237946d23f6a.java:212)
at com.pegarules.generated.html_section.ra_stream_navigationframework_60c7990b17184a0ade12237946d23f6a.execute(ra_stream_navigationframework_60c7990b17184a0ade12237946d23f6a.java:100)
at com.pega.pegarules.session.internal.mgmt.Executable.getStream(Executable.java:4033)
at com.pega.pegarules.session.internal.mgmt.autostreams.AutoStreamRuleRuntime.getSectionStream(AutoStreamRuleRuntime.java:149)
at com.pegarules.generated.html_harness.ra_stream_treenavigation_9d1846d42810e28f13c9fe5867d9a0b2.includeSectionBody_3(ra_stream_treenavigation_9d1846d42810e28f13c9fe5867d9a0b2.java:3600)
at com.pegarules.generated.html_harness.ra_stream_treenavigation_9d1846d42810e28f13c9fe5867d9a0b2.generatePegaHarnessDiv_6(ra_stream_treenavigation_9d1846d42810e28f13c9fe5867d9a0b2.java:1782)
at com.pegarules.generated.html_harness.ra_stream_treenavigation_9d1846d42810e28f13c9fe5867d9a0b2.execute(ra_stream_treenavigation_9d1846d42810e28f13c9fe5867d9a0b2.java:676)
at com.pega.pegarules.session.internal.mgmt.Executable.getStream(Executable.java:4033)
at com.pega.pegarules.session.internal.mgmt.Executable.getStream(Executable.java:3861)
at com.pegarules.generated.activity.ra_action_show_harness_3a715fceb3725b54f857d8327a1c5bba.step6_circum0(ra_action_show_harness_3a715fceb3725b54f857d8327a1c5bba.java:684)
at com.pegarules.generated.activity.ra_action_show_harness_3a715fceb3725b54f857d8327a1c5bba.perform(ra_action_show_harness_3a715fceb3725b54f857d8327a1c5bba.java:155)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3500)
at com.pega.pegarules.session.internal.mgmt.Executable.invokeActivity(Executable.java:10521)
at com.pegarules.generated.activity.ra_action_displayharness_1d414472711606645476be6f8133a69a.step2_circum0(ra_action_displayharness_1d414472711606645476be6f8133a69a.java:336)
at com.pegarules.generated.activity.ra_action_displayharness_1d414472711606645476be6f8133a69a.perform(ra_action_displayharness_1d414472711606645476be6f8133a69a.java:86)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3500)
at com.pega.pegarules.session.internal.mgmt.Executable.invokeActivity(Executable.java:10521)
at com.pegarules.generated.activity.ra_action_perform_b0b86ee90d82814cd7e3e5124876b4e1.step16_circum0(ra_action_perform_b0b86ee90d82814cd7e3e5124876b4e1.java:1211)
at com.pegarules.generated.activity.ra_action_perform_b0b86ee90d82814cd7e3e5124876b4e1.perform(ra_action_perform_b0b86ee90d82814cd7e3e5124876b4e1.java:352)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3500)
at com.pega.pegarules.session.internal.mgmt.Executable.invokeActivity(Executable.java:10521)
at com.pegarules.generated.activity.ra_action_gotoprevioustask_9fae697ae221236e1c8151e5eed4a8c1.step18_circum0(ra_action_gotoprevioustask_9fae697ae221236e1c8151e5eed4a8c1.java:1768)
at com.pegarules.generated.activity.ra_action_gotoprevioustask_9fae697ae221236e1c8151e5eed4a8c1.perform(ra_action_gotoprevioustask_9fae697ae221236e1c8151e5eed4a8c1.java:374)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3500)
at com.pega.pegarules.session.internal.mgmt.base.ThreadRunner.runActivitiesAlt(ThreadRunner.java:646)
at com.pega.pegarules.session.internal.mgmt.PRThreadImpl.runActivitiesAlt(PRThreadImpl.java:461)
at com.pega.pegarules.session.internal.engineinterface.service.HttpAPI.runActivities(HttpAPI.java:3322)
at com.pega.pegarules.session.external.engineinterface.service.EngineAPI.processRequestInner(EngineAPI.java:385)
at sun.reflect.GeneratedMethodAccessor179.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
at java.lang.reflect.Method.invoke(Method.java:620)
at com.pega.pegarules.session.internal.PRSessionProviderImpl.performTargetActionWithLock(PRSessionProviderImpl.java:1270)
at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:1008)
at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:841)
at com.pega.pegarules.session.external.engineinterface.service.EngineAPI.processRequest(EngineAPI.java:331)
at com.pega.pegarules.session.internal.engineinterface.service.HttpAPI.invoke(HttpAPI.java:850)
at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl._invokeEngine_privact(EngineImpl.java:315)
at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl.invokeEngine(EngineImpl.java:263)
at com.pega.pegarules.session.internal.engineinterface.etier.ejb.EngineBean.invokeEngine(EngineBean.java)
at sun.reflect.GeneratedMethodAccessor119.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
at java.lang.reflect.Method.invoke(Method.java:620)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:367)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingThrowable(PRBootstrap.java:408)
at com.pega.pegarules.boot.internal.extbridge.AppServerBridgeToPega.invokeMethodPropagatingThrowable(AppServerBridgeToPega.java:223)
at com.pega.pegarules.boot.internal.extbridge.AppServerBridgeToPega.invokeMethodPropagatingException(AppServerBridgeToPega.java:245)
at com.pega.pegarules.internal.etier.ejb.EngineBeanBoot.invokeEngine(EngineBeanBoot.java:168)
at com.pega.pegarules.internal.etier.interfaces.EJSLocalStatelessEngineBMT_f2439d86.invokeEngine(Unknown Source)
at com.pega.pegarules.priv.context.JNDIEnvironment.invokeEngineInner(JNDIEnvironment.java:278)
at com.pega.pegarules.priv.context.JNDIEnvironment.invokeEngine(JNDIEnvironment.java:223)
at com.pega.pegarules.web.impl.WebStandardImpl.makeEtierRequest(WebStandardImpl.java:574)
at com.pega.pegarules.web.impl.WebStandardImpl.doPost(WebStandardImpl.java:374)
at sun.reflect.GeneratedMethodAccessor164.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
at java.lang.reflect.Method.invoke(Method.java:620)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:367)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingThrowable(PRBootstrap.java:408)
at com.pega.pegarules.boot.internal.extbridge.AppServerBridgeToPega.invokeMethodPropagatingThrowable(AppServerBridgeToPega.java:223)
at com.pega.pegarules.boot.internal.extbridge.AppServerBridgeToPega.invokeMethod(AppServerBridgeToPega.java:272)
at com.pega.pegarules.internal.web.servlet.WebStandardBoot.doPost(WebStandardBoot.java:121)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at com.ibm.ws.cache.servlet.ServletWrapper.serviceProxied(ServletWrapper.java:307)
at com.ibm.ws.cache.servlet.CacheHook.handleFragment(CacheHook.java:562)
at com.ibm.ws.cache.servlet.CacheHook.handleServlet(CacheHook.java:255)
at com.ibm.ws.cache.servlet.ServletWrapper.service(ServletWrapper.java:259)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1230)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:779)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1114)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:87)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:919)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1662)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:200)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:463)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:530)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:316)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:88)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:816)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1881)
Caused by:
com.pega.pegarules.pub.PRException: Error mapping incoming response to .response_GET: java.lang.ClassCastException: java.util.LinkedHashMap incompatible with java.util.List
From: (H5342E6EF77140D20F7FC92489ECFB7C1:WPWD35JX.opr.statefarm.org)
at com.pega.pegarules.integration.engine.internal.ServiceHelper.setInboundJsonValue(ServiceHelper.java:1791)
at com.pega.pegarules.integration.engine.internal.ServiceHelper.setInboundDataValue(ServiceHelper.java:1594)
at com.pega.pegarules.integration.engine.internal.ServiceHelper.mapInboundData(ServiceHelper.java:1421)
at com.pega.pegarules.integration.engine.internal.util.PRServiceUtils.mapInboundData(PRServiceUtils.java:1259)
PEG
IN
Can you try sending the response as below.
Multiple Request:
[{"alias":"xxxx","caption":"","memberName":"Name LName","title":"Office Representative","license":"10xx","associd":"XBWKAK"},{"alias":"yyyy","caption":"","memberName":"Her Name","title":"","license":"8c0v56","associd":"00"}]
Single Request:
[{"alias":"zzzz","caption":"","memberName":"HIs Name","title":"","license":"9b78","associd":"0"}]
Please share the screenshots of Connect-REST rule incase if this doesn't work.
Gangababu G.V