设置的Java DXA-例如,Web应用程序失败,空指针丢失二元/系统/资产


2

帮助请求设立DXA示例Java Web应用程序在Tomcat:

尝试安装DXA 1.2的Java Tomcat上8+原样是从下载网站分发的。

除config xmls外没有变化。

这是cd_dynamic_conf.xml,文件的其余部分与提供的相同。

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

异常堆栈跟踪是

com.sdl.webapp.common.api.localization.LocalizationResolverException:异常而产生本地化:[3]/DXA-示例-web应用 在com.sdl .jbp.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:84 4)[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.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(App licationFilterChain.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] 在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)[catalina.jar:8.0.30] 在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 .RELEA SE.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] 引起:com.sdl.webapp.common .api.localization.LocalizationFactoryException:读取本地化配置时的异常:[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提供商-1.2-SNAPSHOT.jar:1.2-快照] ... 38个共同帧省略 所致:com.sdl.webapp.common.api .content.StaticContentNotFoundException:找不到二进制变体:[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 co m.sdl.webapp.common.impl.localization.LocalizationFactoryImpl.parseJsonFileTree(LocalizationFactoryImpl.java:190)〜[DXA-共IMPL-1.2-SNAPSHOT.jar:1.2-快照]

+2

的'Localization'例外建议您cd_dynamic_conf配置不正确。您是否按照此处列出的步骤操作? http://docs.sdl.com/LiveContent/content/en-US/SDL%20DXA-v2/GUID-2DEBAC0B-C053-4221-B7B9-9966D03A25B1 23 12月. 152015-12-23 22:04:39

  0

你可以编辑你的问题,并显示你的'cd_dynamic_conf .xml'并确认那里的URL和发布ID确实是正确的? 24 12月. 152015-12-24 08:05:08

  0

@NunoLinhares - Yep已经按照实况内容所述的所有步骤进行。 24 12月. 152015-12-24 23:13:33

  0

@BartKoopman - 感谢您的建议!已经从配置文件提供主机条目。 24 12月. 152015-12-24 23:14:14

  0

这可能听起来很愚蠢,但您是否使用该URL和路径访问该网站? Http://www.javadxa.com:8080/com.td.www.dxa? 24 12月. 152015-12-24 23:37:21

  0

您是否发布了所有内容,您是否可以在代理数据库中看到二进制变体,并且您是否可以确认'cd_dynamic'中的发布ID的确与您的代理数据库中的内容匹配。从堆栈跟踪中,我的第一个想法是不匹配,或者不是所有内容都发布(例如“发布设置”页面)。 25 12月. 152015-12-25 08:23:44

2

感谢所有建议!这是我如何才能使其工作。

  1. 新增dxa-example-webapp,通过对窗口编辑server.xml文件host元素如下

    <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. 修改etc/host文件到本地主机名映射到DXA应用的所希望的结构域在Tomcat的8根应用。

    127.0.0.1 www.javadxa.com