Support Article
ClassCastException while mapping inbound JSON
SA-60690
Summary
The application fails to map the inbound JSON when the data model inheritance path has properties with same name but different types, or has properties with same name and same type.
The properties with same name and same type are created twice by the Create Rest Integration wizard. The Service in the Connect-REST returns a NULL string instead of a page list. This occurs when there is no data to be returned for the page list which fails the Connect-REST mapping.
Error Messages
Fail: Error mapping incoming response to .response_GET: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.List
Steps to Reproduce
- Install HFix-27308
- Create a Connect-REST Integration with the response data mapped to a page list
- Send a NULL string as Service response that is to be mapped to the page list
- Run the Create REST Integration wizard and consume the sample response to generate the data model. The properties of same type are generated twice and also Pega fails to parse the attached responses when a property with same name is created with a different type
Root Cause
A defect in Pegasystems’ code or rules. These issues were due to regression of HFix-27308.
Resolution
Apply HFix-45193.Published July 23, 2018 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.