I am following the below url to configure DD4T 2.0 to consume DXA Model Service: http://blog.trivident.com/switching-to-the-dxa-2-model-service-in-your-dd4t-application/
As per above article, when we try to validate the Model Service to read content published from DD4T 2.0 templates using Postman, we are getting the below error:
{
"timestamp": [
"String",
"2018-06-01T07:50:12.821+0000"
],
"status": 500,
"error": "Internal Server Error",
"exception": "com.sdl.webapp.common.api.content.ContentProviderException",
"message": "Couldn't deserialize DD4T content for request PageRequestDto(publicationId=32, uriType=tcm, path=/somepage/index.htm, includePages=INCLUDE, contentType=MODEL, dataModelType=R2, expansionDepth=100, depthCounter=com.sdl.dxa.common.dto.DepthCounter@9f)",
"path": "/PageModel/tcm/32/somepage/index.htm"
}
The content is coming fine when we are using the content service URL in compressed JSON format
Updated v2: Updated the logback of model service - debug mode.
The logs genrated in dxa.date.log
shows below error:
DEBUG c.s.d.m.s.ContentService - Trying to request a page with localization id = '32' and path = '/somepage/index.htm'
DEBUG c.s.d.m.s.ContentService - Requested publication '32', path '/somepage/index.htm', result is '[tcm:xx-xxxxxx-xx]'
INFO c.s.d.m.s.DefaultPageModelService - Found DD4T model while requested R2, need to convert, no expansion needed, request PageRequestDto(publicationId=32, uriType=tcm, path=/somepage/index.htm, includePages=INCLUDE, contentType=MODEL, dataModelType=R2, expansionDepth=100, depthCounter=com.sdl.dxa.common.dto.DepthCounter@9f)
ERROR o.d.d.b.j.JsonDataBinder - Error deserializing.
com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'H4sIAAAAAAAEAO1d647bOJZ': was expecting ('true', 'false' or 'null')
at [Source: (String)"H4sIAAAAAAAEAO1d647bOJZ+Fa5.......tNXVVEErz59eAs+"[truncated 10300 chars]; line: 1, column: 24]
at com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1804)
......
Can you please help in resolving the above error.