2

Help requested to set up DXA Sample Java webApp on Tomcat :

Trying to install DXA 1.2 for Java on Tomcat 8+ as-is distribution from download site.

No changes except config xmls.

Here is cd_dynamic_conf.xml, rest of the file is as provided.

<Host Domain="www.javadxa.com" Port="8080" Protocol="http" path="/com.td.www.dxa"/>

Exception stacktrace is

com.sdl.webapp.common.api.localization.LocalizationResolverException: Exception while creating localization: [3] /dxa-example-webapp at com.sdl.webapp.tridion.TridionLocalizationResolver.createLocalization(TridionLocalizationResolver.java:90) ~[dxa-tridion-provider-1.2-SNAPSHOT.jar:1.2-SNAPSHOT] at com.sdl.webapp.tridion.TridionLocalizationResolver.getLocalization(TridionLocalizationResolver.java:57) ~[dxa-tridion-provider-1.2-SNAPSHOT.jar:1.2-SNAPSHOT] at com.sdl.webapp.common.impl.interceptor.LocalizationResolverInterceptor.preHandle(LocalizationResolverInterceptor.java:66) ~[dxa-common-impl-1.2-SNAPSHOT.jar:1.2-SNAPSHOT] at org.springframework.web.servlet.HandlerExecutionChain.applyPreHandle(HandlerExecutionChain.java:130) ~[spring-webmvc-3.2.8.RELEASE.jar:3.2.8.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:919) ~[spring-webmvc-3.2.8.RELEASE.jar:3.2.8.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856) ~[spring-webmvc-3.2.8.RELEASE.jar:3.2.8.RELEASE] at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:953) [spring-webmvc-3.2.8.RELEASE.jar:3.2.8.RELEASE] at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:844) [spring-webmvc-3.2.8.RELEASE.jar:3.2.8.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:622) [servlet-api.jar:na] at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:829) [spring-webmvc-3.2.8.RELEASE.jar:3.2.8.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) [servlet-api.jar:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291) [catalina.jar:8.0.30] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:8.0.30] at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-websocket.jar:8.0.30] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [catalina.jar:8.0.30] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:8.0.30] at com.tridion.ambientdata.web.AmbientDataServletFilter.doFilter(AmbientDataServletFilter.java:302) [cd_ambient-7.1.0.jar:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [catalina.jar:8.0.30] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:8.0.30] at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) [spring-web-3.2.8.RELEASE.jar:3.2.8.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-3.2.8.RELEASE.jar:3.2.8.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [catalina.jar:8.0.30] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:8.0.30] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212) [catalina.jar:8.0.30] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) [catalina.jar:8.0.30] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) [catalina.jar:8.0.30] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) [catalina.jar:8.0.30] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [catalina.jar:8.0.30] at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616) [catalina.jar:8.0.30] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [catalina.jar:8.0.30] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:521) [catalina.jar:8.0.30] at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1096) [tomcat-coyote.jar:8.0.30] at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:674) [tomcat-coyote.jar:8.0.30] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500) [tomcat-coyote.jar:8.0.30] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456) [tomcat-coyote.jar:8.0.30] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_79] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_79] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-util.jar:8.0.30] at java.lang.Thread.run(Thread.java:745) [na:1.7.0_79] Caused by: com.sdl.webapp.common.api.localization.LocalizationFactoryException: Exception while reading configuration of localization: [3] /dxa-example-webapp at com.sdl.webapp.common.impl.localization.LocalizationFactoryImpl.parseJsonFileTree(LocalizationFactoryImpl.java:195) ~[dxa-common-impl-1.2-SNAPSHOT.jar:1.2-SNAPSHOT] at com.sdl.webapp.common.impl.localization.LocalizationFactoryImpl.loadMainConfiguration(LocalizationFactoryImpl.java:110) ~[dxa-common-impl-1.2-SNAPSHOT.jar:1.2-SNAPSHOT] at com.sdl.webapp.common.impl.localization.LocalizationFactoryImpl.createLocalization(LocalizationFactoryImpl.java:86) ~[dxa-common-impl-1.2-SNAPSHOT.jar:1.2-SNAPSHOT] at com.sdl.webapp.tridion.TridionLocalizationResolver.createLocalization(TridionLocalizationResolver.java:88) ~[dxa-tridion-provider-1.2-SNAPSHOT.jar:1.2-SNAPSHOT] ... 38 common frames omitted Caused by: com.sdl.webapp.common.api.content.StaticContentNotFoundException: No binary variant found for: [3] /dxa-example-webapp/system/config/_all.json at com.sdl.webapp.tridion.DefaultProvider.getStaticContentFile(DefaultProvider.java:301) ~[dxa-tridion-provider-1.2-SNAPSHOT.jar:1.2-SNAPSHOT] at com.sdl.webapp.tridion.DefaultProvider.getStaticContent(DefaultProvider.java:260) ~[dxa-tridion-provider-1.2-SNAPSHOT.jar:1.2-SNAPSHOT] at com.sdl.webapp.common.impl.localization.LocalizationFactoryImpl.parseJsonFileTree(LocalizationFactoryImpl.java:190) ~[dxa-common-impl-1.2-SNAPSHOT.jar:1.2-SNAPSHOT]

  • 2
    The Localization exceptions suggest that your cd_dynamic_conf is not properly configured. Did you follow the steps listed here? docs.sdl.com/LiveContent/content/en-US/SDL%20DXA-v2/… – Nuno Linhares Dec 23 '15 at 22:04
  • can you edit your question and show what is listed in your cd_dynamic_conf.xml and confirm that the URL(s) and Publication ID(s) in there are indeed correct? – Bart Koopman Dec 24 '15 at 8:05
  • @NunoLinhares - Yep have followed all steps as stated in live content. – Milind Dec 24 '15 at 23:13
  • @BartKoopman - Thanks for suggestion! Have provided host entry from config file. – Milind Dec 24 '15 at 23:14
  • This might sound silly, but are you using that URL and path to access the site? Http://www.javadxa.com:8080/com.td.www.dxa? – Nuno Linhares Dec 24 '15 at 23:37
2

Thanks for all suggestions! Here is how I could make it work.

  1. Added dxa-example-webapp as root application in Tomcat 8 by editing server.xml file host element as below

    <Host name="localhost"  appBase="webapps" unpackWARs="true" autoDeploy="true">
    
      <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
           prefix="localhost_access_log" suffix=".txt"
           pattern="%h %l %u %t &quot;%r&quot; %s %b" />
      <Context path="/" docBase="dxa-example-webapp">
        <WatchedResource>WEB-INF/web.xml</WatchedResource>
      </Context>
      <Context path="/ROOT" docBase="ROOT">
        <WatchedResource>WEB-INF/web.xml</WatchedResource>
      </Context>
      <Context path="/manager" docBase="manager" privileged="true">
        <WatchedResource>WEB-INF/web.xml</WatchedResource>
      </Context>
      <Context path="/host-manager" docBase="host-manager" privileged="true">
        <WatchedResource>WEB-INF/web.xml</WatchedResource>
      </Context>
    </Host>
    
  2. Modify etc/host file on windows to map local host name to a desired domain of DXA application.

    127.0.0.1 www.javadxa.com
    

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.