2

We are using SDL Web 8.5 and DXA 2.0 Java suddenly our website started showing 500 error. While debugging we have found that pages throwing below kind of model service error

Whitelabel Error Page

This application has no explicit mapping for /error, so you are seeing this as a fallback.
Thu Jan 17 17:06:21 AST 2019
There was an unexpected error (type=Internal Server Error, status=500).
Cannot expand entity EntityModelData(id=7579-4330, componentTemplate=null, linkUrl=null, content=null, binaryContent=null, externalContent=null) for page PageRequestDto(publicationId=27, uriType=tcm, path=/en/personal/loans/housing-loans, includePages=INCLUDE, contentType=MODEL, dataModelType=R2, expansionDepth=100, depthCounter=com.sdl.dxa.common.dto.DepthCounter@9c)

While the error inside model service log file is

2019-01-17 15:56:18,061 ERROR o.d.d.b.j.JsonDataBinder - Error deserializing. 
com.fasterxml.jackson.databind.exc.MismatchedInputException: No content to map due to end-of-input
 at [Source: (String)""; line: 1, column: 0]
    at com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:59)
    at com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:4133)
    at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3988)
    at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2992)
    at org.dd4t.databind.builder.json.JsonDataBinder.buildComponentPresentation(JsonDataBinder.java:90)
    at com.sdl.dxa.modelservice.service.DefaultEntityModelService._processDd4tEntityModel(DefaultEntityModelService.java:101)
    at com.sdl.dxa.modelservice.service.DefaultEntityModelService._processR2EntityModel(DefaultEntityModelService.java:125)
    at com.sdl.dxa.modelservice.service.DefaultEntityModelService.loadEntity(DefaultEntityModelService.java:80)
    at sun.reflect.GeneratedMethodAccessor118.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
    at org.springframework.cache.interceptor.CacheInterceptor$1.invoke(CacheInterceptor.java:52)
    at org.springframework.cache.interceptor.CacheAspectSupport.invokeOperation(CacheAspectSupport.java:345)
    at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:408)
    at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:327)
    at org.springframework.cache.interceptor.CacheInterceptor.invoke(CacheInterceptor.java:61)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
    at com.sun.proxy.$Proxy134.loadEntity(Unknown Source)
    at com.sdl.dxa.modelservice.service.processing.expansion.PageModelExpander._expandEntity(PageModelExpander.java:199)
    at com.sdl.dxa.modelservice.service.processing.expansion.PageModelExpander.processEntityModel(PageModelExpander.java:97)
    at com.sdl.dxa.api.datamodel.processing.DataModelDeepFirstSearcher._traverseDataModel(DataModelDeepFirstSearcher.java:165)
    at com.sdl.dxa.api.datamodel.processing.DataModelDeepFirstSearcher.traverseObject(DataModelDeepFirstSearcher.java:104)
    at com.sdl.dxa.api.datamodel.processing.DataModelDeepFirstSearcher._traverseRegionModel(DataModelDeepFirstSearcher.java:158)
    at com.sdl.dxa.api.datamodel.processing.DataModelDeepFirstSearcher.traverseObject(DataModelDeepFirstSearcher.java:102)
    at com.sdl.dxa.api.datamodel.processing.DataModelDeepFirstSearcher._traversePageModel(DataModelDeepFirstSearcher.java:142)
    at com.sdl.dxa.api.datamodel.processing.DataModelDeepFirstSearcher.traverseObject(DataModelDeepFirstSearcher.java:100)
    at com.sdl.dxa.modelservice.service.processing.expansion.PageModelExpander.expandPage(PageModelExpander.java:68)
    at com.sdl.dxa.modelservice.service.DefaultPageModelService._processR2PageModel(DefaultPageModelService.java:151)
    at com.sdl.dxa.modelservice.service.DefaultPageModelService.loadPageModel(DefaultPageModelService.java:100)
    at sun.reflect.GeneratedMethodAccessor83.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
    at org.springframework.cache.interceptor.CacheInterceptor$1.invoke(CacheInterceptor.java:52)
    at org.springframework.cache.interceptor.CacheAspectSupport.invokeOperation(CacheAspectSupport.java:345)
    at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:408)
    at org.springframework.cache.interceptor.CacheAspectSupport.execute(CacheAspectSupport.java:327)
    at org.springframework.cache.interceptor.CacheInterceptor.invoke(CacheInterceptor.java:61)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
    at com.sun.proxy.$Proxy135.loadPageModel(Unknown Source)
    at com.sdl.dxa.modelservice.controller.PageModelController.getPage(PageModelController.java:93)
    at sun.reflect.GeneratedMethodAccessor81.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
    at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:133)
    at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:97)
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)
    at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)
    at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:635)
    at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.boot.web.filter.ApplicationContextHeaderFilter.doFilterInternal(ApplicationContextHeaderFilter.java:55)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at com.tridion.ambientdata.web.AbstractAmbientDataServletFilter.doFilter(AbstractAmbientDataServletFilter.java:291)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:110)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at com.tridion.ambientdata.web.AbstractAmbientDataServletFilter.doFilter(AbstractAmbientDataServletFilter.java:291)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.web.filter.HttpPutFormContentFilter.doFilterInternal(HttpPutFormContentFilter.java:105)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:81)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:106)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:478)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:803)
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868)
    at org.apache.tomcat.util.net.Nio2Endpoint$SocketProcessor.doRun(Nio2Endpoint.java:1693)
    at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:748)

what could be the root cause of this issue?

Update

we have found that after publishing "Navigation Configuration" component we ended up with this situation

enter image description here

Component Template source

<CompoundTemplate xmlns="http://www.tridion.com/ContentManager/5.3/CompoundTemplate">
  <TemplateInvocation>
    <Template xlink:href="tcm:2-868-2048" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:title="Generate DXA R2 Entity Model" />
    <TemplateParameters>
      <Parameters xmlns="http://www.sdl.com/web/schemas/dynamiccomponent">
        <expandLinkDepth xmlns="http://www.sdl.com/web/schemas/dynamiccomponent">2</expandLinkDepth>
        <modelBuilderTypeNames xmlns="http://www.sdl.com/web/schemas/dynamiccomponent">DefaultModelBuilder;EclModelBuilder</modelBuilderTypeNames>
      </Parameters>
    </TemplateParameters>
  </TemplateInvocation>
  <TemplateInvocation>
    <Template xlink:href="tcm:2-11187-2048" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:title="Add Webtrends Tag" />
    <TemplateParameters></TemplateParameters>
  </TemplateInvocation>
</CompoundTemplate>
  • The “Add Webtrends tag” in the CT is suspicious, Is that TBB intended to work with DXA R2 JSON? – Rick Pannekoek Jan 18 at 10:54
  • Rick “Add Webtrends tag” is doing nothing although we have removed it but still we are facing issue when publishing "Navigation Configuration" component – Abdul Qadir Jan 20 at 8:58
2

According to the Stack Trace, the Model Service thinks that the raw Page content is DD4T JSON. Is that really the case?

Note that the Model Service makes this assumption as soon as it determined that the Page content is not DXA R2 JSON.

A typical way to end up in this situation is if you accidentally used the Default Page Template (which renders HTML).

Another case we’ve observed is that the “JSON” Page Template is used, which does render JSON, but not DXA R2 JSON for a Page Model.

UPDATE

In your case, the problems occurs while (dynamically) expanding a Component Link in the Model Service. That means that the problem lies in a Dynamic Component Presentation (Component ID:7579, CT ID:4330) which contains neither DXA R2 JSON nor DD4T JSON.

  • Raw page content is in JSON format after republishing same page the issue get resolved – Abdul Qadir Jan 18 at 7:14
  • Since the problem seems to lie in a DCP, I guess the problem got resolved by republishing the DCP (as a result of republishing the Page). – Rick Pannekoek Jan 18 at 10:59
  • Rick when we publish "Navigation Configuration" component issue get reproduced – Abdul Qadir Jan 20 at 8:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.