ClassCastException while mapping inbound JSON
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.
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
A defect in Pegasystems’ code or rules. These issues were due to regression of HFix-27308.
0% found this useful