2

I have an SDL Web 8.5 environment with DXA 1.7 .Net working fine. I have downloaded and compiled (as per docs) DXA 1.7 Java and deployed it to Tomcat. However, I get a Context error, as shown below.

I can confirm the Context Service is registered with the Discovery and it is working fine (.Net web app works).

12:58:27.706 [http-nio-64925-exec-6] ERROR c.s.w.c.i.m.ViewModelRegistryImpl - Cannot determine entity type for semantic schema names: '[http://www.sdl.com/web/schemas/core:PageNavigationMetadata]'. Please make sure that an entry is registered for this view name in the ViewModelRegistry. 12:58:27.710 [http-nio-64925-exec-6] ERROR c.s.w.c.controller.PageController - Exception while processing request for: / java.lang.NullPointerException: null at com.sdl.webapp.common.impl.mapping.SemanticMapperImpl.createInstance(SemanticMapperImpl.java:53) ~[dxa-common-impl-1.7.0.jar:1.7.0] at com.sdl.webapp.common.impl.mapping.SemanticMapperImpl.createEntity(SemanticMapperImpl.java:96) ~[dxa-common-impl-1.7.0.jar:1.7.0] at com.sdl.webapp.tridion.mapping.PageBuilderImpl.createViewModel(PageBuilderImpl.java:306) ~[dxa-tridion-provider-1.7.0.jar:1.7.0] at com.sdl.webapp.tridion.mapping.PageBuilderImpl.createPageModel(PageBuilderImpl.java:274) ~[dxa-tridion-provider-1.7.0.jar:1.7.0] at com.sdl.webapp.tridion.mapping.PageBuilderImpl.createPage(PageBuilderImpl.java:194) ~[dxa-tridion-provider-1.7.0.jar:1.7.0] at com.sdl.webapp.tridion.mapping.ModelBuilderPipelineImpl.createPageModel(ModelBuilderPipelineImpl.java:53) ~[dxa-tridion-provider-1.7.0.jar:1.7.0] at com.sdl.webapp.tridion.mapping.AbstractDefaultContentProvider$1.tryFindPage(AbstractDefaultContentProvider.java:232) ~[dxa-tridion-provider-1.7.0.jar:1.7.0] at com.sdl.webapp.tridion.mapping.AbstractDefaultContentProvider$1.tryFindPage(AbstractDefaultContentProvider.java:212) ~[dxa-tridion-provider-1.7.0.jar:1.7.0] at com.sdl.webapp.common.util.LocalizationUtils.findPageByPath(LocalizationUtils.java:162) ~[dxa-common-api-1.7.0.jar:1.7.0] at com.sdl.webapp.tridion.mapping.AbstractDefaultContentProvider.getPageModel(AbstractDefaultContentProvider.java:212) ~[dxa-tridion-provider-1.7.0.jar:1.7.0] at com.sdl.webapp.common.controller.PageController.getPageModel(PageController.java:296) ~[dxa-common-api-1.7.0.jar:1.7.0] at com.sdl.webapp.common.controller.PageController.handleGetPage(PageController.java:120) ~[dxa-common-api-1.7.0.jar:1.7.0] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_121] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_121] at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_121] at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:219) ~[spring-web-3.1.4.RELEASE.jar:3.1.4.RELEASE] at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132) ~[spring-web-3.1.4.RELEASE.jar:3.1.4.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:100) ~[spring-webmvc-3.1.4.RELEASE.jar:3.1.4.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:604) ~[spring-webmvc-3.1.4.RELEASE.jar:3.1.4.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:565) ~[spring-webmvc-3.1.4.RELEASE.jar:3.1.4.RELEASE] at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80) ~[spring-webmvc-3.1.4.RELEASE.jar:3.1.4.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923) ~[spring-webmvc-3.1.4.RELEASE.jar:3.1.4.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852) ~[spring-webmvc-3.1.4.RELEASE.jar:3.1.4.RELEASE] at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882) ~[spring-webmvc-3.1.4.RELEASE.jar:3.1.4.RELEASE] at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778) ~[spring-webmvc-3.1.4.RELEASE.jar:3.1.4.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:622) [servlet-api.jar:na] at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) [servlet-api.jar:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) [catalina.jar:8.5.11] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [catalina.jar:8.5.11] at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-websocket.jar:8.5.11] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [catalina.jar:8.5.11] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [catalina.jar:8.5.11] at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) [spring-web-3.1.4.RELEASE.jar:3.1.4.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) [spring-web-3.1.4.RELEASE.jar:3.1.4.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) [catalina.jar:8.5.11] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) [catalina.jar:8.5.11] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) [catalina.jar:8.5.11] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [catalina.jar:8.5.11] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:474) [catalina.jar:8.5.11] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) [catalina.jar:8.5.11] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [catalina.jar:8.5.11] at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624) [catalina.jar:8.5.11] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) [catalina.jar:8.5.11] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349) [catalina.jar:8.5.11] at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:783) [tomcat-coyote.jar:8.5.11] at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) [tomcat-coyote.jar:8.5.11] at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:798) [tomcat-coyote.jar:8.5.11] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1434) [tomcat-coyote.jar:8.5.11] at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat-coyote.jar:8.5.11] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.8.0_121] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.8.0_121] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:8.5.11] at java.lang.Thread.run(Unknown Source) [na:1.8.0_121]

  • 1
    I don't think you have a problem with your tridion microservices setup, the problem looks like some issue with your dxa build : Cannot determine entity type for semantic schema names: '[sdl.com/web/schemas/core:PageNavigationMetadata]'. This error means that a mapping between a schema and a model class is missing in your application. You create such a mapping in a module initializer (for example github.com/sdl/dxa-modules/blob/master/webapp-java/…). Do you have such a mapping anywhere in your code ? – Harald Hoffelinck Mar 9 '17 at 13:46
  • Hi Harald. Thank you. I would have assumed something like CoreInitializer.java would have been included in the package I downloaded. It would be within one of the jars wouldn't it? – Richard Hamlyn Mar 9 '17 at 14:17
  • 2
    In earlier versions of dd4t, the core was part of the framework, however now it's been moved out as a separate module. The reasoning behind this is that you don't need to use the provided sample schema's that are defined in the core module. – Harald Hoffelinck Mar 9 '17 at 15:23
  • 1
    Hi Harald. Thank you! That was exactly the issue. The default from Maven is to download without the core. Once I set this to download the 'core' I was up and running. Appreciate the time... – Richard Hamlyn Mar 9 '17 at 17:51
  • BTW, this doesn't look like a "Context error" to me. Is the title applicable to this problem? – Rick Pannekoek Mar 9 '17 at 18:50
3

Moved some of my comments to the answer :

I don't think you have a problem with your tridion microservices setup, the problem looks like some issue with your dxa build : Cannot determine entity type for semantic schema names: '[sdl.com/web/schemas/core:PageNavigationMetadata]';.

This error means that a mapping between a schema and a model class is missing in your application. You create such a mapping in a module initializer (for example http://github.com/sdl/dxa-modules/blob/master/webapp-java/…). Do you have such a mapping anywhere in your code ?

This mapping is usually set in the core module (or any of your modules).

In earlier versions of DXA, the core module was part of the framework, however now it's been moved out as a separate module, that you need to download separately. The reasoning behind this is that you don't need to use the provided sample schema's that are defined in the core module.

1

I had the same issue and after reading carefully through the comments, I figured out what I needed. Just to be very explicit (in hopes of speeding up the solution for anyone else encountering this issue), to add the missing DXA core module, add the following to your pom.xml dependencies:

    <dependency>
        <groupId>com.sdl.dxa.modules</groupId>
        <artifactId>dxa-module-core</artifactId>
    </dependency>

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.