2

I am using dxa-web-application-java and plan to manually build the HTML Designs and deploy them in the ROOT of out Tomcat run web application. I followed steps here. The path for the designs originally was ..\webapps\ROOT\BinaryData\3\system\assets. So I replaced this with the assets from the dist file. I get the below issue.

com.sdl.webapp.common.api.localization.LocalizationFactoryException: File not found: ..\webapps\ROOT\system\assets\version.json at com.sdl.webapp.common.impl.localization.LocalizationFactoryImpl.loadVersion(LocalizationFactoryImpl.java:139) ~[common-impl-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]

and in the UI

java.lang.NullPointerException com.sdl.webapp.common.impl.markup.MarkupImpl.versionedContent(MarkupImpl.java:54)

I created a folder \webapps\ROOT\system\assets\version.json manually and then get this error

[http-apr-8080-exec-2] ERROR c.s.w.m.c.core.MainController - Exception while processing request for: /system/v0.06/assets/scripts/xpm.js com.sdl.webapp.common.api.content.StaticContentNotFoundException: No binary variant found for: [3] /system/assets/scripts/xpm.js at com.sdl.webapp.dd4t.DD4TStaticContentProvider.getStaticContentFile(DD4TStaticContentProvider.java:118) ~[dd4t-provider-1.0-SNAPSHOT.jar:1.0-SNAPSHOT]

6
  • I doubt this approach will work. The assets folder is a fetched from binary variants from broker database. It is a serialized version of published HTML design items in broker database. You can either add the HTML design to your Java MVC project or Publish it from tridion using publish HTML design. Sep 22 '15 at 8:10
  • How do I add the HTML design to my MVC project? I am not publishing the HTML design. I am instead manually building the design using steps mentioned in the link shared.
    – Rache
    Sep 22 '15 at 8:48
  • Put assets folder at Web-INF level and access it in your pages. And I think you also need to make changes in controller to override the default logic of reading the assets from Binarydata. (This is not detailed in the link shared..you may need to do more analysis.) Sep 23 '15 at 8:48
  • Huston, when trying to publish the HTML design, I am getting the error Could not find a part of the path 'D:\_934bc0e\src\system\assets\less\_custom.less'. I haven't even modified the contents in the zip file except unzip it and zip it back. Have you come across this issue.
    – Rache
    Sep 28 '15 at 7:37
  • 1
    Finally I got it working. Instead of using the html-design.zip that was uploaded in CMS, I used the html/design from a fresh download from Tridion world. I then added a custom .less file with my style and compiled it with grunt. Then I added this src folder to the zip and published successfully. Not sure what the issue was but thanks Hudson.
    – Rache
    Sep 28 '15 at 11:09

Your Answer

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

Browse other questions tagged or ask your own question.