0

We're upgrading DXA 1.5 to 1.8; We're facing an issue web app throws a null exception below error message when try to call this URL this /system/config/_all.json

2018-12-21 10:26:26,297 DEBUG DefaultContentProvider - Writing binary content to file: C:\Program Files\Apache Software Foundation\Tomcat 9.0\wtpwebapps\dxaWeb\BinaryData\826\system\config\_all.json
2018-12-21 10:26:26,327 ERROR PageController - Exception while processing request for: /
java.lang.NullPointerException: null
    at com.sdl.webapp.tridion.mapping.DefaultContentProvider.getStaticContentFile(DefaultContentProvider.java:95)
    at com.sdl.webapp.tridion.mapping.AbstractDefaultContentProvider.getStaticContentFile(AbstractDefaultContentProvider.java:366)
    at com.sdl.webapp.tridion.mapping.AbstractDefaultContentProvider.getStaticContent(AbstractDefaultContentProvider.java:309)
    at com.sdl.webapp.common.impl.localization.LocalizationFactoryImpl.parseJsonFileTree(LocalizationFactoryImpl.java:239)
    at com.sdl.webapp.common.impl.localization.LocalizationFactoryImpl.loadMainConfiguration(LocalizationFactoryImpl.java:108)
    at com.sdl.webapp.common.impl.localization.LocalizationFactoryImpl.createLocalization(LocalizationFactoryImpl.java:84)
    at com.sdl.webapp.tridion.AbstractTridionLocalizationResolver.createLocalization(AbstractTridionLocalizationResolver.java:101)
    at com.sdl.webapp.tridion.AbstractTridionLocalizationResolver.getLocalization(AbstractTridionLocalizationResolver.java:68)
    at com.sdl.webapp.common.impl.WebRequestContextImpl.localization(WebRequestContextImpl.java:205)
    at com.sdl.webapp.common.impl.WebRequestContextImpl.getLocalization(WebRequestContextImpl.java:85)
    at com.sdl.webapp.common.impl.WebRequestContextImpl$$FastClassByCGLIB$$2bfec188.invoke(<generated>)
    at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
    at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:689)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
    at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
    at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:622)
    at com.sdl.webapp.common.impl.WebRequestContextImpl$$EnhancerByCGLIB$$fbe4fc14.getLocalization(<generated>)
    at com.sdl.webapp.common.impl.interceptor.StaticContentInterceptor.preHandle(StaticContentInterceptor.java:102)
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:914)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
    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:53)
    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:88)
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
    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:490)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
    at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:668)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
    at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:408)
    at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
    at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:770)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)
    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)

Note:

I can see the _all.json binary content in broker db but not getting response on content sevice.

If I pull the BinaryContents http://domain:8081/client/v2/content.svc/BinaryContents service collection via postman: http://www.filedropper.com/binarycontents I do not see the VariantId: Y29uZmlnLWJvb3RzdHJhcA & BinaryId = 216112 -> core component related data but I can see the response has some VariantId='WyNkZWYjXQ==' related data

Any suggestion, why my content service is not returning this VariantId: Y29uZmlnLWJvb3RzdHJhcA & BinaryId = 216112 -> core component

Updated:

I have tried unpublished/published the "Publish Settings and Publish HTML Design" pages

Content service Request:

http://domain:8081/client/v2/content.svc/BinaryContents(BinaryId=216112,PublicationId=826,VariantId='Y29uZmlnLWJvb3RzdHJhcA==')/$value`

Postman response:

"Unable to build binary entry: No resource was found for the requested item`"

DXAWeb App TRACE log: http://www.filedropper.com/cdcore2018-12-21

  • Please edit your question and update if there any exception error messages in Web App and Content service – Velmurugan Dec 20 '18 at 21:53
  • Thanks Vel. I have added the dxaWeb app debug log. – Jayakumar Devaraj Dec 21 '18 at 16:10
2

Your question is not clear to me what exactly you're trying to do and what is your expected output.

For my understanding, you have upgraded your DXA web app from DXA 1.5 to DXA 1.8 with web-8.5 and your web app not getting downloaded your publish settings media system config files.

eg: \BinaryData\826\system\config_all.json

Try this below URL using postman to check /system/config/_all.json page binary content exist in broker DB or not?

http://domain:8081/client/v2/content.svc/BinaryContents(BinaryId=216112 ,PublicationId=826,VariantId='Y29uZmlnLWJvb3RzdHJhcA==')/$value

If this API call gets the response then no issue with broker DB, something wrong in your migrated DXA web application.

If this API call not getting the response then your _System->Publish Settings page not published to your broker DB.

Try unpublish and republish this page to check, enable your web app log file to TRACE to troubleshoot and keep it posted your findings and TRACE logs

Updated:

It seems to look like your CD Deployer is configured to store Binaries on the file system instead of in the CD Content Store (database).

Double check your broker-db for that binary content exists in the DB or not by running this select query in your broker db?

SELECT TOP 1 * FROM [BINARY_CONTENT] WHERE PUBLICATION_ID = 826 AND BINARY_ID=216112 AND VARIANT_ID = 'config-bootstrap'

I hope it helps

  • Thanks Velmurugan for your response. I'm sorry for the bit confused question. I have updated my question with more details now but you were understood my question correctly. I have tried all your suggestion and I provided my update in my question. – Jayakumar Devaraj Dec 21 '18 at 16:01
  • Your web app logs were useful, that explains what happened, see the updated section in the answer – Velmurugan Dec 21 '18 at 16:55
  • Thanks Vel. Your select query has return the data and I can see the "content" column: { "defaultLocalization":true, "staging":true, "mediaRoot":"$BINARY_DOMAIN$/media", "siteLocalizations":[ { "Id":"826", "Path":"/", "Language":"English", "IsMaster":true } ], "files":[ "/system/config/core.taxonomies.json", "/system/config/core.json", "/system/config/core.schemas.json", "/system/config/nationwide.schemas.json", "/system/config/nationwide.templates.json" ] } – Jayakumar Devaraj Dec 21 '18 at 18:47
  • Enable content-service logs to TRACE to look at what's going on why you getting this "Unable to build binary entry: No resource was found for the requested item" – Velmurugan Dec 21 '18 at 19:01
  • you were right Vel. I found the cause is one of the server cd_storage_conf.xml was not configured properly. thanks for all your input. – Jayakumar Devaraj Dec 26 '18 at 20:14
0

Make sure CD Deployer(cd_storage_conf.xml) is configured to store Binaries on the CD Content Store (database) instead of file system.

Example:

<Publication Id="826" cached="false" defaultStorageId="EXPreviewDB">
    <Item cached="false" itemExtension=".jsp" storageId="EXPreviewDB" typeMapping="Page"/>
    <Item cached="false" itemExtension=".json" storageId="EXPreviewDB" typeMapping="Binary"/>
    <Item cached="true" storageId="EXPreviewDB" typeMapping="Binary"/>
</Publication>

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.