An error occurred while processing the template.
Java method "static com.liferay.document.library.kernel.service.DLFileEntryLocalServiceUtil.getFileEntryByUuidAndGroupId(String, long)" threw an exception; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign file = fileEntry.getFileEntry...  [in template "20155#20195#32280" at line 213, column 9]
----
1<#-- 
2  ~ Copyright (c) 2020 AXA Group Operations Spain S.A. 
3
4  ~ Licensed under the AXA Group Operations Spain S.A. License (the "License"); 
5  ~ you may not use this file except in compliance with the License. 
6  ~ A copy of the License can be found in the LICENSE.TXT file distributed 
7  ~ together with this file. 
8
9  ~ Unless required by applicable law or agreed to in writing, software 
10  ~ distributed under the License is distributed on an "AS IS" BASIS, 
11  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 
12  ~ See the License for the specific language governing permissions and 
13  ~ limitations under the License. 
14  --> 
15 
16<#assign JournalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")> 
17<#assign scopeId = articleGroupId> 
18<#assign contentId = .vars['reserved-article-id'].data> 
19<#assign journalArticle = JournalArticleLocalService.getArticle(getterUtil.getLong(scopeId), contentId)> 
20<#assign articleUrlTitle = journalArticle.getUrlTitle()> 
21<#assign articlePrimKey = JournalArticleLocalService.getArticle(getterUtil.getLong(scopeId), contentId).resourcePrimKey> 
22<#assign insightId = "insight-${contentId}"> 
23 
24<#-- TagCommander  --> 
25<script type="text/javascript"> 
26    if (typeof tc_vars != 'undefined') { 
27        tc_vars.page_name = '/insights-article/${articleUrlTitle}'; 
28
29</script> 
30 
31<#macro init_video video_attributes video_name video_description video_duration video_thumbnail video_partnerId video_player video_nameDiv video_entry video_autoplay is_playlist> 
32    <#assign styleDiv = "" /> 
33<!-- Outer div defines maximum space the player can take --> 
34<div ${video_attributes}> 
35    <!--  inner pusher div defines aspect ratio: in this case 16:9 ~ 56.25% --> 
36    <div id="dummy" class="video-dummy"></div> 
37    <!--  the player embed target, set to take up available absolute space   --> 
38    <div id="${video_nameDiv}" class="video-player" style="${styleDiv}" itemprop="video" itemscope 
39         itemtype="http://schema.org/VideoObject"> 
40        <span itemprop="name" content="${video_name}"></span> 
41        <span itemprop="description" content="${video_description}"></span> 
42        <span itemprop="duration" content="${video_duration}"></span> 
43        <span itemprop="thumbnail" content="${video_thumbnail}"></span> 
44    </div> 
45</div> 
46</#macro> 
47 
48<#macro show_playlist video_name video_description video_duration video_thumbnail video_partnerId video_player video_entry video_autoplay> 
49    <#assign nameDiv = "kaltura_player_${.now?long}" /> 
50    <#assign nameDivList = "playListHolder_${.now?long}" /> 
51 
52<#-- Build attribute list for playlist --> 
53    <#assign video_attributes = 'class="axaim-video-playlist"' /> 
54    <#assign kaltura_url = "https://cdnapisec.kaltura.com/p/${video_partnerId}/sp/${video_partnerId}00/embedIframeJs/uiconf_id/${video_player}/partner_id/${video_partnerId}" /> 
55    <#assign video_attributes = video_attributes + " data-kaltura-url='${kaltura_url}'" />     
56    <#assign kaltura_options = '{"targetId":"${nameDiv}","clipListTargetId":"${nameDivList}","wid":"_${video_partnerId}","uiConfId":"${video_player}","autoPlay":"${video_autoplay}","kpl0Name":"${video_name}","kpl0Id":"${video_entry}","entryId":"${video_entry}"}' />   
57    <#assign video_attributes = video_attributes + " data-options='${kaltura_options}'" />  
58 
59    <@init_video video_attributes=video_attributes video_name=video_name video_description=video_description video_duration=video_duration 
60    video_thumbnail=video_thumbnail video_partnerId=video_partnerId video_player=video_player video_nameDiv=nameDiv video_entry="${video_entry}" video_autoplay="${video_autoplay}" is_playlist=true/> 
61 
62</#macro> 
63<#macro show_video video_name video_description video_duration video_thumbnail video_partnerId  video_player video_entry video_autoplay> 
64    <#assign nameDiv = "kaltura_player_${.now?long}" /> 
65 
66<#-- Build attribute list for single video --> 
67    <#assign video_attributes = 'class="axaim-video gh-video embed-responsive embed-responsive-16by9"' />    
68    <#assign kaltura_url = "https://cdnapisec.kaltura.com/p/${video_partnerId}/sp/${video_partnerId}00/embedIframeJs/uiconf_id/${video_player}/partner_id/${video_partnerId}" /> 
69    <#assign video_attributes = video_attributes + " data-kaltura-url='${kaltura_url}'" />       
70    <#assign kaltura_options = '{"targetId":"${nameDiv}","wid":"_${video_partnerId}","uiConfId":"${video_player}","entryId":"${video_entry}","autoPlay":"${video_autoplay}"}' />   
71    <#assign video_attributes = video_attributes + " data-options='${kaltura_options}'" /> 
72 
73    <@init_video video_attributes=video_attributes video_name=video_name video_description=video_description video_duration=video_duration 
74    video_thumbnail=video_thumbnail video_partnerId=video_partnerId  video_player=video_player video_nameDiv=nameDiv video_entry="${video_entry}" video_autoplay="${video_autoplay}" is_playlist=false/> 
75 
76</#macro> 
77 
78<#--TO BE REMOVED ONCE ALL THE THEME SETTINGS ARE UPDATED IN ALL SITES--> 
79<style type="text/css"> 
80    .axaim-page-title.axaim-title-main-color { 
81        display: none; 
82
83 
84    .journal-content-article .axaim-page-title.axaim-title-main-color { 
85        display: block; 
86
87</style> 
88 
89<div class="page-main-title"> 
90    <div class="container"> 
91        <h1>${journalArticle.getTitle(locale)}</h1> 
92    </div> 
93</div> 
94 
95<div id="${insightId}" class="insights-detail-old"> 
96<#if  banner?has_content && banner.getData()?has_content > 
97    <div class="axaim-insights-banner" style="background-image:url('${htmlUtil.escape(banner.getData())}')" 
98         title="${htmlUtil.escape(banner.getData())}"></div> 
99<#else> 
100    <div class="axaim-insights-banner placeholder" title="placeholder-image"></div> 
101</#if> 
102<#-- Associated documents --> 
103 
104<#assign first_literature = getterUtil.getBoolean(true) > 
105<#list literature.getSiblings() as cur_literature > 
106    <#if cur_literature?has_content && cur_literature.getData()!="" && cur_literature.type_literature?? > 
107        <#assign type_literature = cur_literature.type_literature.getData()> 
108        <#assign has_doc = type_literature == "document_library" && cur_literature.doc_literature?has_content && cur_literature.doc_literature.getData()!=""> 
109        <#assign has_ext = type_literature == "document_extern" && cur_literature.link_literature?has_content && cur_literature.link_literature.getData()!=""> 
110 
111        <#if has_doc || has_ext> 
112            <#if first_literature> 
113                <#assign first_literature = getterUtil.getBoolean(false) > 
114            <div class="axaim-insights-documentation axaim-toggled"> 
115                <div class="axaim-insights-docs-header"> 
116                    <div class="container"> 
117                        <p class="axaim-insights-docs-header-text"> 
118                            ${axaimTranslate("axaim.webcontent.news.literature.title")} 
119                            <svg class="header-main__menu__icon" version="1.1" xmlns="http://www.w3.org/2000/svg" 
120                                 width="15" height="10" viewBox="0 0 32 32"> 
121                                <path d="M16 28.067c-0.533 0-1-0.2-1.4-0.6l-14-14c-1.8-1.8 1-4.667 2.8-2.8l12.6 12.533 12.6-12.533c1.8-1.8 4.667 1 2.8 2.8l-14 14c-0.333 0.4-0.867 0.6-1.4 0.6z"></path> 
122                            </svg> 
123                        </p> 
124                    </div> 
125                </div> 
126            <div class="axaim-insights-docs-list"> 
127            <div class="container"> 
128            <ul> 
129            </#if> 
130            <#if cur_literature.alt_literature?has_content && cur_literature.alt_literature.getData()!=""> 
131                <#assign alt_literature = htmlUtil.escape(cur_literature.alt_literature.getData())> 
132            <#else> 
133                <#assign alt_literature = htmlUtil.escape(cur_literature.getData())> 
134            </#if> 
135            <li> 
136                <#if has_doc> 
137                    <a href="${cur_literature.doc_literature.getData()}" title="${alt_literature}" 
138                       target="_blank" rel="noopener noreferrer">${cur_literature.getData()}</a> 
139                <#elseif has_ext> 
140                    <a href="${htmlUtil.escape(cur_literature.link_literature.getData())}" title="${alt_literature}" 
141                       target="_blank" rel="noopener noreferrer">${cur_literature.getData()}</a> 
142                </#if> 
143            </li> 
144        </#if> 
145    </#if> 
146</#list> 
147<#if !first_literature> 
148</ul> 
149</div> 
150</div> 
151</div> 
152</#if> 
153 
154    <div class="container"> 
155    <#if  author?has_content && author.getSiblings()?has_content> 
156        <div class="axaim-insights-authors"> 
157            <#assign first_author = getterUtil.getBoolean(true)> 
158            <#list author.getSiblings() as cur_author> 
159                <#if cur_author?has_content && cur_author.getData()!=""> 
160                    <#if first_author> 
161                        <div class="axaim-insights-authors-title"> 
162                            ${axaimTranslate("axaim.webcontent.news.author") } 
163                        </div> 
164                        <#assign first_author = getterUtil.getBoolean(false)> 
165                    </#if> 
166                    <div class="axaim-insights-authors-author"> 
167                        <#if cur_author.alt_author?has_content && cur_author.alt_author.getData()!=""> 
168                            <#assign alt_author = htmlUtil.escape(cur_author.alt_author.getData())> 
169                        <#else> 
170                            <#assign alt_author = htmlUtil.escape(cur_author.getData())> 
171                        </#if> 
172                        <#if cur_author.photo_author?has_content && cur_author.photo_author.getData()!=""> 
173                            <div class="axaim-insights-authors-author-photo" 
174                                 style="background-image:url('${cur_author.photo_author.getData()}')" 
175                                 alt="${alt_author}"> 
176                            </div> 
177                        <#else> 
178                            <div class="axaim-insights-authors-author-photo-default" alt="${alt_author}"> 
179                            </div> 
180                        </#if> 
181                        <div class="axaim-insights-authors-author-detall"> 
182                            <#if cur_author.link_author?has_content && cur_author.link_author.getData()!=""> 
183                                <a href="${htmlUtil.escape(cur_author.link_author.getData())}" title="${alt_author}" 
184                                   target="_blank" rel="noopener noreferrer"> 
185                                    ${htmlUtil.escape(cur_author.getData())} 
186                                </a> 
187                            <#else> 
188                                ${htmlUtil.escape(cur_author.getData())} 
189                            </#if> 
190                        </div> 
191                    </div> 
192                </#if> 
193            </#list> 
194        </div> 
195    </#if> 
196 
197        <div class="axaim-insights-category"> 
198        ${axaimTranslate("axaim.webcontent.insights.category")} 
199        </div> 
200 
201    <#--h1 class="axaim-insights-title"> 
202        ${htmlUtil.escape(.vars['reserved-article-title'].data)} 
203    </h1--> 
204 
205    <#-- Insight PDF download Button --> 
206    <#if insight_document?has_content && insight_document.getData()?has_content> 
207    <#-- Gets the file from the URL --> 
208        <#assign parts = insight_document.getData()?split("/") /> 
209        <#assign groupId = parts[2]?number /> 
210    <#--assign uuId = parts[5]?substring(0, parts[5]?index_of("?")) /--> 
211        <#assign uuId = parts[5] /> 
212        <#assign fileEntry = staticUtil["com.liferay.document.library.kernel.service.DLFileEntryLocalServiceUtil"]> 
213        <#assign file=fileEntry.getFileEntryByUuidAndGroupId(uuId,groupId) > 
214 
215    <#-- Gets the filesize and converts it to a readable format --> 
216        <#assign order = file.getSize()?round?c?length /> 
217        <#assign thousands = ((order - 1) / 3)?floor /> 
218        <#if (thousands < 0)><#assign thousands = 0 /></#if> 
219        <#assign siMap = [ {"factor": 1, "unit": ""}, {"factor": 1024, "unit": "KB"}, {"factor": 1048576, "unit": "MB"}, {"factor": 1073741824, "unit":"GB"}, {"factor": 1099511627776, "unit": "TB"} ]/> 
220        <#assign sizeStr = (file.getSize() / (siMap[thousands].factor))?string("0.#")?replace(",", ".") + siMap[thousands].unit /> 
221 
222        <a href="${insight_document.getData()}" target="_blank" class="button custom-icon grey"> 
223            <span>PDF ${sizeStr}</span> 
224            <span class="icon"> 
225                <svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="20px" height="20px" viewBox="0 0 20 20" style="enable-background:new 0 0 20 20;" xml:space="preserve"> 
226                    <g id="Symbols"> 
227                        <g id="axa_icon_download"> 
228                            <g id="Line"> 
229                                <path d="M10,12.5c-0.6,0-1-0.4-1-1V4c0-0.6,0.4-1,1-1s1,0.4,1,1v7.5C11,12.1,10.6,12.5,10,12.5z"></path> 
230                            </g> 
231                            <g id="Line_1_"> 
232                                <path d="M10,13.6l-4.1-3.3c-0.4-0.3-0.5-1-0.2-1.4s1-0.5,1.4-0.2L10,11l2.9-2.3c0.4-0.3,1.1-0.3,1.4,0.2c0.3,0.4,0.3,1.1-0.2,1.4 L10,13.6z"></path> 
233                            </g> 
234                            <g id="Rectangle-10"> 
235                                <path d="M18,18H2v-4c0-0.6,0.4-1,1-1s1,0.4,1,1v2h12v-2c0-0.6,0.4-1,1-1s1,0.4,1,1V18z"></path> 
236                            </g> 
237                        </g> 
238                    </g> 
239                </svg> 
240            </span> 
241        </a> 
242    </#if> 
243 
244        <div class="axaim-insights-date"> 
245            <#if date?has_content && date.data?has_content> 
246                <#assign date_obj = dateUtil.parseDate("yyyy-MM-dd",date.data,locale)> 
247                <#setting locale=locale> 
248                ${date_obj?date?string.long} 
249            </#if> 
250        </div> 
251 
252        <div class="axaim-insights-content"> 
253        ${content.getData()} 
254        </div> 
255 
256    <#if video?has_content && video.getSiblings()?has_content> 
257        <div class="axaim-insights-video"> 
258            <#assign first_video = getterUtil.getBoolean(true)> 
259                <#list video.getSiblings() as cur_video> 
260                    <#if cur_video?has_content && cur_video.video_type?has_content && cur_video.getData()!="" && 
261                    cur_video.description?has_content && cur_video.description.getData()!="" && 
262                    cur_video.entryId?has_content && cur_video.entryId.getData()!=""> 
263                        <#if cur_video.video_type.getData()="video"> 
264                            <@show_video video_name="${htmlUtil.escape(cur_video.getData())}" 
265                            video_description="${htmlUtil.escape(cur_video.description.getData())}" 
266                            video_duration="${cur_video.duration.getData()}" 
267                            video_thumbnail="${htmlUtil.escape(cur_video.thumbnail.getData())}" 
268                            video_partnerId="${cur_video.partnerId.getData()}" 
269                            video_player="${cur_video.player.getData()}" 
270                            video_entry="${htmlUtil.escape(cur_video.entryId.getData())}" 
271                            video_autoplay="${cur_video.autoPlay.getData()}" /> 
272                        <#else> 
273                            <@show_playlist video_name="${htmlUtil.escape(cur_video.getData())}" 
274                            video_description="${htmlUtil.escape(cur_video.description.getData())}" 
275                            video_duration="${cur_video.duration.getData()}" 
276                            video_thumbnail="${htmlUtil.escape(cur_video.thumbnail.getData())}" 
277                            video_partnerId="${cur_video.partnerId.getData()}" 
278                            video_player="${cur_video.player.getData()}" 
279                            video_entry="${htmlUtil.escape(cur_video.entryId.getData())}" 
280                            video_autoplay="${cur_video.autoPlay.getData()}" /> 
281                        </#if> 
282                    </#if> 
283                </#list> 
284        </div> 
285    </#if> 
286 
287    <#if footnotes?has_content && footnotes.getData()?has_content> 
288        <div class="axaim-insights-footnotes"> 
289            ${footnotes.getData()} 
290        </div> 
291    </#if> 
292 
293        <div class="axaim-insights-additional-content"> 
294 
295        <#assign first_related = getterUtil.getBoolean(true)> 
296        <#list related_link.getSiblings() as cur_related_link> 
297            <#if cur_related_link?has_content && cur_related_link.getData()!="" && cur_related_link.type_link?? && 
298            ((cur_related_link.link_to_page?has_content && cur_related_link.link_to_page.getData()!="") 
299            || (cur_related_link.link?has_content && cur_related_link.link.getData()!="") 
300            || (cur_related_link.link_to_document?has_content && cur_related_link.link_to_document.getData()!=""))> 
301                <#assign type_link = cur_related_link.type_link.getData()> 
302                <#assign has_page = type_link == "link_to_page" && cur_related_link.link_to_page?has_content && cur_related_link.link_to_page.getData()!=""> 
303                <#assign has_ext = type_link == "link_extern" && cur_related_link.link?has_content && cur_related_link.link.getData()!=""> 
304                <#assign has_doc = type_link == "document_library" && cur_related_link.link_to_document?has_content && cur_related_link.link_to_document.getData()!=""> 
305 
306                <#if has_page || has_ext || has_doc> 
307                    <#if first_related> 
308                    <div class="axaim-insights-links"> 
309                        <div class="axaim-insights-links-title"> 
310                            ${axaimTranslate("axaim.webcontent.news.links") } 
311                        </div> 
312                        <#assign first_related = getterUtil.getBoolean(false)> 
313                    </#if> 
314                    <div class="axaim-insights-links-link"> 
315                        <#if cur_related_link.alt_related_link?has_content && cur_related_link.alt_related_link.getData()!=""> 
316                            <#assign alt_literature = htmlUtil.escape(cur_related_link.alt_related_link.getData())> 
317                        <#else> 
318                            <#assign alt_literature = htmlUtil.escape(cur_related_link.getData())> 
319                        </#if> 
320                        <#if has_page> 
321                            <#assign link_url = cur_related_link.link_to_page.getFriendlyUrl()> 
322                            <#assign link_target = "_self"> 
323                            <#assign link_rel = "undefined"> 
324                        <#elseif has_ext> 
325                            <#assign link_url = htmlUtil.escape(cur_related_link.link.getData())> 
326                            <#assign link_target = "_blank"> 
327                            <#assign link_rel = "noopener noreferrer"> 
328                        <#elseif has_doc> 
329                            <#assign link_url = cur_related_link.link_to_document.getData()> 
330                            <#assign link_target = "_blank"> 
331                            <#assign link_rel = "noopener noreferrer"> 
332                        </#if> 
333                        <a href="${link_url}" title="${alt_literature}" rel="${link_rel}" 
334                           target="${link_target}">${htmlUtil.escape(cur_related_link.getData())}</a> 
335                    </div> 
336                </#if> 
337            </#if> 
338        </#list> 
339        <#if !first_related> 
340        </div> 
341        </#if> 
342        </div> 
343    </div> 
344</div> 
345 
346<script> 
347    (function (AUI) { 
348        AUI().use('node', 'event', function (A) { 
349            var header = A.one('#${insightId} .axaim-insights-docs-header'); 
350            if (header !== null) { 
351                header.on('click', function () { 
352                    this.ancestor().toggleClass('axaim-toggled'); 
353                }); 
354
355        }); 
356    })(AUI); 
357</script> 
358 
359<#function axaimTranslate labelText> 
360    <#if serviceLocator.findService("com.axa.im.wcm.labeltranslation.service.LabelTranslationLocalService")??> 
361        <#assign languageService = serviceLocator.findService("com.axa.im.wcm.labeltranslation.service.LabelTranslationLocalService") /> 
362        <#assign translated = languageService.getLabelTranslation(labelText, locale, companyId) /> 
363    <#else> 
364        <#assign translated = labelText /> 
365    </#if> 
366    <#return translated /> 
367</#function>