An error occurred while processing the template.
Java method "com.sun.proxy.$Proxy377.getJournalArticle(long, String)" threw an exception when invoked on com.sun.proxy.$Proxy377 object "com.suez.openresource.service.impl.SuezTemplateLocalServiceImpl@55f7ddfc"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign journalArticle = suezTemplate...  [in template "20116#20152#SUEZ_LINK_DOCUMENT_DETAILS" at line 10, column 1]
----
1<#assign serviceContext = staticUtil["com.liferay.portal.kernel.service.ServiceContextThreadLocal"].getServiceContext()> 
2<#assign themeDisplay = serviceContext.getThemeDisplay() /> 
3<#assign portalURL = themeDisplay.getURLPortal() /> 
4<#assign userTimeZone = themeDisplay.getUser().getTimeZone()> 
5 
6<#assign suezTemplateService = serviceLocator.findService("com.suez.openresource.service.SuezTemplateLocalService")> 
7 
8<#assign articleTitle = .vars['reserved-article-title'].getData()> 
9<#assign articleId = .vars['reserved-article-id'].getData()> 
10<#assign journalArticle = suezTemplateService.getJournalArticle(scopeGroupId, articleId)> 
11<#assign categories = suezTemplateService.getArticleCategoriesSortedByTitle(articleId, "CONTENT_CATEGORIES", groupId, locale)> 
12 
13<#assign tagCat = suezTemplateService.getArticleCategoriesSortedByTitle(articleId, "SECTION_CATEGORIES", groupId, locale)> 
14 
15<#assign articleUrl = portalURL + suezTemplateService.getArticleDetailsPageUrl(journalArticle)> 
16 
17<#assign dateString = .vars['reserved-article-display-date'].getData()> 
18 
19<#assign className = suezTemplateService.getClassName(journalArticle)> 
20<#assign classPK = suezTemplateService.getRatingStatsClassPk(journalArticle)> 
21<#assign totalScore = suezTemplateService.getContentTotalScore(journalArticle)> 
22<#assign isLike = suezTemplateService.didTheUserVoted(themeDisplay.getUserId(), journalArticle)> 
23 
24<#assign author = suezTemplateService.getAuthorByJournalArticle(groupId, themeDisplay, journalArticle)!""> 
25 
26<#assign twitterCookiesEnabled = suezTemplateService.isTwitterCookiesEnabled(serviceContext.getRequest())> 
27<#assign facebookCookiesEnabled = suezTemplateService.isFacebookCookiesEnabled(serviceContext.getRequest())> 
28<#assign linkedinCookiesEnabled = suezTemplateService.isLinkedinCookiesEnabled(serviceContext.getRequest())> 
29 
30<section class="article detailed-page-main-section"> 
31    <article class="wrapper-container small-size"> 
32        <header class="detailed-page-header reset"> 
33            <#if categories?has_content> 
34                <ul class="categories-list"> 
35                <#assign counter = 0> 
36                <#list categories as category> 
37                    <#assign counter = counter+1> 
38                    <#if counter < 6> 
39                        <#if category.getTitle(locale) != ''> 
40                            <#assign searchUrl = suezTemplateService.getCategorySearchLink(category, locale)> 
41                            <li> 
42                                <a href="${searchUrl}" class="categorie-label"><i class="icon-tag"></i> ${category.getTitle(locale)}</a> 
43                            </li> 
44                        </#if> 
45                    </#if> 
46                </#list> 
47                </ul> 
48            </#if> 
49            <h1 class="detailed-page-title">${articleTitle}</h1> 
50            <div class="detailed-page-infos"> 
51 
52                <#assign authorDate = suezTemplateService.formatShortDate(dateString, locale, userTimeZone)> 
53                ${suezTemplateService.getProfileDisplay(author, "document-details", authorDate, locale)} 
54 
55                <#assign className = suezTemplateService.getClassName(journalArticle)> 
56                <#assign classPK = suezTemplateService.getRatingStatsClassPk(journalArticle)> 
57                <#assign totalScore = suezTemplateService.getContentTotalScore(journalArticle)> 
58                <#assign isLike = suezTemplateService.didTheUserVoted(themeDisplay.getUserId(), journalArticle)> 
59 
60                <ul class="detailed-page-buttons"> 
61                    <#if themeDisplay.isSignedIn()> 
62                        <#assign upvoteButtonCss = ""> 
63                        <#assign upvoteButtonLinkData = "true"> 
64                        <#assign upvoteButtonLink = "#"> 
65                    <#else> 
66                        <#assign upvoteButtonCss = "suez-sign-in"> 
67                        <#assign upvoteButtonLinkData = "false"> 
68                        <#assign upvoteButtonLink = themeDisplay.getURLSignIn()> 
69                    </#if> 
70                    <li class="${upvoteButtonCss}" 
71                        data-init="upvote-button" 
72                        data-button-type="details" 
73                        data-classname="${className}" 
74                        data-classpk="${classPK}" 
75                        data-islike="${isLike?c}" 
76                        data-totalscore="${totalScore}"> 
77                        <a href="${upvoteButtonLink}" data-redirect="${upvoteButtonLinkData}" class="suez-btn with-border transparent-bg normal-size detailed-page-upvote-button js-likes-btn"> 
78                            <span class="likes"> 
79                                <i class="fa fa-heart" aria-hidden="true"></i><@liferay.language key="upvote.button.details.label"/> 
80                            </span> 
81                            <span class="likes2"><i class="fa fa-heart" aria-hidden="true"></i> 
82                            </span> 
83                        </a> 
84                    </li> 
85                </ul> 
86 
87                <ul class="social-sharing-menu reset"> 
88                    <#assign croppedContent = ""> 
89                    <#if introduction?? && introduction.getData() != ""> 
90                        <#assign croppedContent = stringUtil.shorten(introduction.getData(), 150)> 
91                    </#if> 
92                    <#assign shareOnTwitterUrl = suezTemplateService.getTwitterShareUrl(articleUrl)> 
93                    <#assign shareOnLinkedInUrl = suezTemplateService.getLinkedinShareUrl(articleUrl, articleTitle, croppedContent)> 
94                    <#assign shareOnFacebookUrl = suezTemplateService.getFacebookShareUrl(articleUrl)> 
95                    <#assign openSocialCookiesRestrictionPopup = "javascript:openCookiesSettingsPopup()"/> 
96                    <li> 
97                        <a class="suez-btn with-border transparent-bg ${twitterCookiesEnabled?then('', 'disabled-width-active')}" 
98                           data-init="${twitterCookiesEnabled?then('share-popup', '')}" 
99                           data-lang="${locale.getLanguage()}" 
100                           data-text="${articleTitle}" 
101                           data-url="${articleUrl}" 
102                           href="${twitterCookiesEnabled?then(shareOnTwitterUrl, openSocialCookiesRestrictionPopup)}" 
103                           title="<@liferay.language key="suez.social.sharing.on.twitter"/>"> 
104                           <i class="icon-twitter" aria-hidden="true"></i> 
105                        </a> 
106                    </li> 
107                    <li> 
108                        <a class="suez-btn with-border transparent-bg ${linkedinCookiesEnabled?then('', 'disabled-width-active')}" 
109                           data-init="${linkedinCookiesEnabled?then('share-popup', '')}" 
110                           title="<@liferay.language key="suez.social.sharing.on.linkedin"/>" 
111                           href="${linkedinCookiesEnabled?then(shareOnLinkedInUrl, openSocialCookiesRestrictionPopup)}"> 
112                           <i class="icon-linkedin" aria-hidden="true"></i> 
113                        </a> 
114                    </li> 
115                    <li> 
116                        <a class="suez-btn with-border transparent-bg ${facebookCookiesEnabled?then('', 'disabled-width-active')}" 
117                           data-init="${facebookCookiesEnabled?then('share-popup', '')}" 
118                           title="<@liferay.language key="suez.social.sharing.on.facebook"/>" 
119                           href="${facebookCookiesEnabled?then(shareOnFacebookUrl, openSocialCookiesRestrictionPopup)}"> 
120 
121                           <i class="fa fa-facebook" aria-hidden="true"></i> 
122                        </a> 
123                    </li> 
124                    <li> 
125                        <a class="suez-btn with-border transparent-bg" 
126                           href="mailto:?subject=${articleTitle?url('UTF-8')} 
127                           &body=<@liferay.language key="suez.social.sharing.mail.body"/> ${articleTitle?url('UTF-8')} ${articleUrl}" 
128                           title="<@liferay.language key="suez.social.sharing.by.email"/>"> 
129                           <i class="icon-mail"></i> 
130                        </a> 
131                    </li> 
132                </ul> 
133 
134            </div> 
135        </header> 
136        <div class="detailed-page-content"> 
137            <div class="rich-text"> 
138                ${introduction.getData()} 
139            </div> 
140 
141        </div> 
142        <div class="resource-document"> 
143            <div class="resource-document-content reset"> 
144                <#if file?? && file.getData() != ""> 
145                    <#assign fileEntry = suezTemplateService.getFileEntry(file.getData())> 
146                    <#assign fileSize = fileEntry.getSize()> 
147                    <#assign fileSize = suezTemplateService.convertFileSize(fileSize, themeDisplay)> 
148                    <#assign fileExtension = fileEntry.getExtension()> 
149                    <#assign fileName = fileEntry.getTitle()?replace("." + fileExtension, "")> 
150 
151 
152                    <ul class="downloads-list reset"> 
153                        <li> 
154                            <p class="download"> 
155                                <span class="download-document"> 
156                                    <span class="download-document-name">${fileName}</span> 
157                                    <span class="download-document-info"> 
158                                        <span class="download-document-size">${fileSize} | ${fileExtension}</span> 
159 
160                                        <#assign icoClass = suezTemplateService.getFormatIconClass(fileExtension)> 
161                                        <i class="fa ${icoClass}" aria-hidden="true"></i> 
162                                    </span> 
163                                </span> 
164                                <a href="${file.getData()}" target="_blank" class="download-document-button suez-btn" title="${fileName}  ${fileExtension}  ${fileSize}" ><i class="icon-download"></i></a> 
165                            </p> 
166                        </li> 
167                    </ul> 
168 
169                </#if> 
170 
171                <#if image?? && image.getData()?? && image.getData() != ""> 
172                    <img alt="${image.getAttribute("alt")}" title="${image.getAttribute("alt")}" src="${image.getData()}" /> 
173                </#if> 
174 
175                <#if link?? && link.getData() != ""> 
176 
177                    <ul class="downloads-list reset"> 
178                        <li> 
179                            <p class="download"> 
180                                <span class="download-document"> 
181                                    <span class="download-document-name">${documentTitle.getData()}</span> 
182                                    <span class="download-document-info"> 
183 
184                                        <i class="fa icon-link" aria-hidden="true"></i> 
185                                    </span> 
186                                </span> 
187                                <a href="${link.getData()}" target="_blank" class="download-document-button suez-btn" title="${documentTitle.getData()}" ><i class="icon-arrow-more"></i></a> 
188                            </p> 
189                        </li> 
190                    </ul> 
191                </#if> 
192 
193                <#if videoURL?? && videoURL.getData() != ""> 
194                    <#assign youtubeEmbedURL = suezTemplateService.getYoutubeEmbedURL(videoURL.getData())> 
195                    <#if youtubeEmbedURL != ""> 
196                        <#assign youtubeIframe = "<iframe width=\"100%\" src=\"" + youtubeEmbedURL + "\" frameborder=\"0\" allowfullscreen></iframe>" /> 
197                        ${suezTemplateService.formatWYSIWYG(youtubeIframe, serviceContext.getRequest())} 
198                    </#if> 
199                </#if> 
200 
201            </div> 
202        </div> 
203 
204        <!-- TODO: TAG SEARCH LINK --> 
205 
206            <div class="tags-list-block reset"> 
207                <#if labelSource?? && labelSource.getData() != ""> 
208 
209                    <#if URLSource?? && URLSource.getData() != ""> 
210                        <p class="tags-list-title"><@liferay.language key="suez.docs.label.from"/> <a target="_blanc" href="${URLSource.getData()}"><span>${labelSource.getData()}</span></a> </p> 
211                    <#else> 
212                        <span class="tags-list_source"><@liferay.language key="suez.docs.label.from"/> ${labelSource.getData()}</span> 
213                    </#if> 
214                </#if> 
215 
216	        	<ul class="tags-list reset" data-init="list-show-more"> 
217	                <#assign counter = 0> 
218		                <#list tagCat as cat> 
219		                  <#assign counter = counter+1>                   
220		                    <#assign tagClass = ""> 
221		                    <#if counter &gt; 5> 
222		                        <#assign tagClass = "hidden"> 
223		                    </#if> 
224		                     <#assign tagSearchUrl = suezTemplateService.getCategorySearchLink(cat, locale)> 
225		                    <li class="${tagClass}"><a class="tag-item" href="${tagSearchUrl}">${cat.getTitle(locale)}</a></li> 
226		                </#list> 
227	               	 <#if counter gt 5> 
228		                <li> 
229		                    <a href="#"  class="tag-item tag-more" data-content="list-show-more-button"> 
230		                        <@liferay_ui["message"] key="suez.article.tags.show" arguments="${counter-5}"/> 
231		                    </a> 
232		           	    </li> 
233	               	 </#if> 
234	               </ul> 
235             </div> 
236 
237    </article> 
238</section> 

Comments: