An error occurred while processing the template.
Method "public java.lang.String com.liferay.portlet.journal.asset.JournalArticleAssetRenderer.getURLViewInContext(com.liferay.portal.kernel.portlet.LiferayPortletRequest,com.liferay.portal.kernel.portlet.LiferayPortletResponse,java.lang.String) throws java.lang.Exception" threw an exception when invoked on com.liferay.portlet.journal.asset.JournalArticleAssetRenderer object "com.liferay.portlet.journal.asset.JournalArticleAssetRenderer@1d65bd66". See cause exception.

The failing instruction (print stack trace for 1 more):
==> #assign link = renderer.getURLViewInC...  [in template "10453#10490#8558164" at line 129, column 41]
1<#assign 
2	class = "" 
3	classItem = "" 
4	catFiltersActive = false 
5/> 
6<#list stringUtil.split(metadataFields) as metadata> 
7	<#if metadata == "categories"> 
8		<#assign  
9			class = "categoryfilters" 
10			classItem = "itemCat" 
11			catFiltersActive = true 
12		/> 
13	</#if> 
14</#list> 
15 
16<div class="newsroom ${class}"> 
17<#if entries?has_content> 
18	<#list entries as curEntry> 
19		<#assign  
20			origin = "" 
21			content = "" 
22			date = "" 
23			location = "" 
24			image = "" 
25			image_library = "" 
26			headline = "" 
27			link = "" 
28			smallImage = "" 
29			simulPlayBool = "" 
30			simulPlay = "" 
31			surtitre = "" 
32			 
33			renderer = curEntry.getAssetRenderer() 
34			className = renderer.getClassName() 
35			 
36			availableLanguageIds = renderer.getAvailableLanguageIds() 
37		/> 
38		 
39        <#if className == "com.liferay.portlet.journal.model.JournalArticle"> 
40			<#assign  
41				journalArticle = renderer.getArticle() 
42				isSmallImage = journalArticle.isSmallImage() 
43				smallImageURL = journalArticle.getSmallImageURL() 
44				smallImageId = journalArticle.getSmallImageId() 
45				document = saxReaderUtil.read(journalArticle.getContentByLocale(locale?string)) 
46				rootElement = document.getRootElement() 
47				 
48				articlePrimKey = journalArticle.getResourcePrimKey() 
49				catLocalService = serviceLocator.findService("com.liferay.portlet.asset.service.AssetCategoryLocalService") 
50				vocLocalService = serviceLocator.findService("com.liferay.portlet.asset.service.AssetVocabularyLocalService") 
51				catPropertyLocalService = serviceLocator.findService("com.liferay.portlet.asset.service.AssetCategoryPropertyLocalService") 
52				 
53				classesCat = "" 
54			/> 
55			 
56			<#if catFiltersActive == true> 
57				<#assign 
58					articleCats = catLocalService.getCategories("com.liferay.portlet.journal.model.JournalArticle", getterUtil.getLong(articlePrimKey)) 
59					specialChar = '-|\\=|\\{|\\}|\\*|\\(|\\)|\\“|\\”|\\.|\\\\|/|\\||\'|\\[|\\]|\\°|\\&|\\$|\\#|\\§|\\:|\\,' 
60				/> 
61				<#list articleCats as cat> 
62					<#assign classesCat = classesCat+" cat-"+cat.getTitle('en_GB')?lower_case?replace(specialChar, '', 'r')?lower_case?replace(' ', '-')+"-"+cat.getVocabularyId() /> 
63				</#list> 
64			</#if> 
65				 
66			<#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='origine']")> 
67			<#if xPathSelector.selectSingleNode(rootElement)??>  
68				<#assign origin = getterUtil.getString(xPathSelector.selectSingleNode(rootElement).getStringValue())> 
69			</#if> 
70			 
71			<#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='date']")> 
72			<#if xPathSelector.selectSingleNode(rootElement)??>  
73				<#assign date = getterUtil.getString(xPathSelector.selectSingleNode(rootElement).getStringValue())> 
74			</#if> 
75			 
76			<#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='location']")> 
77			<#if xPathSelector.selectSingleNode(rootElement)??>  
78				<#assign location = getterUtil.getString(xPathSelector.selectSingleNode(rootElement).getStringValue())> 
79			</#if> 
80			 
81			<#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='surtitre']")> 
82			<#if xPathSelector.selectSingleNode(rootElement)??>  
83				<#assign surtitre = getterUtil.getString(xPathSelector.selectSingleNode(rootElement).getStringValue())> 
84			</#if> 
85			 
86			<#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='image']")> 
87			<#if xPathSelector.selectSingleNode(rootElement)??>  
88				<#assign image = getterUtil.getString(xPathSelector.selectSingleNode(rootElement).getStringValue())> 
89			</#if> 
90			 
91			<#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='image_library']")> 
92			<#if xPathSelector.selectSingleNode(rootElement)??>  
93				<#assign image_library = getterUtil.getString(xPathSelector.selectSingleNode(rootElement).getStringValue())> 
94			</#if> 
95			 
96			<#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='headline']")> 
97			<#if xPathSelector.selectSingleNode(rootElement)??>  
98				<#assign headline = getterUtil.getString(xPathSelector.selectSingleNode(rootElement).getStringValue())> 
99			</#if> 
100			 
101			<#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='lien_redirection']")> 
102			<#if xPathSelector.selectSingleNode(rootElement)??>  
103				<#assign lien_redirection = getterUtil.getString(xPathSelector.selectSingleNode(rootElement).getStringValue())> 
104			</#if> 
105			 
106			<#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='simulateur_play']")> 
107			<#if xPathSelector.selectSingleNode(rootElement)??>  
108				<#assign simulPlayBool = getterUtil.getString(xPathSelector.selectSingleNode(rootElement).getStringValue())> 
109			</#if> 
110				 
111			<#assign content = htmlUtil.escape(curEntry.getDescription(locale))>		 
112 
113			<#if content == ""> 
114				<#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='content']")> 
115				<#if xPathSelector.selectSingleNode(rootElement)??> 
116					<#assign content = getterUtil.getString(xPathSelector.selectSingleNode(rootElement).getStringValue())> 
117				</#if> 
118			</#if> 
119 
120			<#if simulPlayBool == "true"> 
121				<#assign simulPlay = "simulplay"> 
122			</#if> 
123			 
124			<#if lien_redirection?? && lien_redirection !=''> 
125				<#assign link = lien_redirection> 
126			<#else> 
127				<#assign link = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, curEntry)> 
128				<#if assetLinkBehavior != "showFullContent"> 
129					<#assign link = renderer.getURLViewInContext(renderRequest, renderResponse, link)> 
130				</#if> 
131			</#if> 
132			 
133			 
134			<#if isSmallImage> 
135				<#if smallImageURL != ""> 
136					<#assign smallImage = smallImageURL> 
137				<#else> 
138					<#assign smallImage = "/image/journal/"+htmlUtil.escape(curEntry.getTitle(locale)?string)+"?img_id="+smallImageId > 
139				</#if> 
140			<#elseif image_library != "" && image_library != "null"> 
141				<#assign smallImage = image_library+'&amp;width=444'> 
142			<#elseif image != "" && image != "null"> 
143				<#assign smallImage = image+'&amp;width=444'> 
144			</#if> 
145			 
146			<div class="element ${classItem}${classesCat} clearfix"> 
147			 
148				<@getEditIcon entry=curEntry/> 
149 
150				<span class="portlet-share pull-right dropdown"> 
151					<#if showAvailableLocales == "true" && availableLanguageIds?size gt 1> 
152						<div class="translations"> 
153						<label><@liferay_ui["message"] key="available-in-these-languages" /></label> 
154						<#list availableLanguageIds as availableLanguageId> 
155							<#assign  
156								availableLanguage = localeUtil.fromLanguageId(availableLanguageId) 
157								host = "${request.getServerName()}" 
158								linkLanguage = link?replace("${host}/${locale.language}/", "${host}/${availableLanguage.language}/") 
159							/> 
160							<span class="otherLang" onmouseover="Liferay.Portal.ToolTip.show(this, '<@getNameLanguage lang=availableLanguage/>')"><a href="${linkLanguage}"><@getLocalLanguage lang=availableLanguage/></a></span> 
161						</#list> 
162						</div> 
163					</#if> 
164					<a data-toggle="dropdown" class="dropdown-toggle" href="#"></a> 
165					<ul class="dropdown-menu" role="menu" aria-labelledby="dLabel"> 
166						<li class="share-tw"> 
167							<a class="share-short" data-link="${link}" data-share="http://twitter.com/home/?status=" href="http://twitter.com/home/?status=${link}"> 
168								Twitter 
169							</a> 
170						</li> 
171						<li class="share-fb"> 
172							<a class="share-short" data-link="${link}" data-share="http://www.facebook.com/sharer.php?u=" href="http://www.facebook.com/sharer.php?u=${link}" > 
173								Facebook 
174							</a> 
175						</li> 
176						<li class="share-go"> 
177							<a class="share-short" data-link="${link}" data-share="https://plus.google.com/share?url=" href="https://plus.google.com/share?url=${link}" > 
178								Google + 
179							</a> 
180						</li> 
181						<li class="share-pi"> 
182							<a class="share-short" data-link="${link}" data-share="http://pinterest.com/pin/create/button/?media=${themeDisplay.getURLPortal()}${smallImage}&url=" href="http://pinterest.com/pin/create/button/?url=${link}&media=${themeDisplay.getURLPortal()}${smallImage}"> 
183								Pinterest 
184							</a> 
185						</li> 
186						<li class="share-li"> 
187							<a class="share-short" data-link="${link}" data-share="http://www.linkedin.com/shareArticle?mini=true&amp;url=" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=${link}"> 
188								LinkedIn 
189							</a> 
190						</li> 
191						<li class="share-em"> 
192							<a href="mailto:?body=${link}"> 
193								Email 
194							</a> 
195						</li> 
196					</ul> 
197				</span> 
198				 
199				 
200				 
201				<#if smallImage != ""> 
202					<div class="hidden-phone pull-left image-news"> 
203						<a href="${link}">  
204							<div class="image mask ${simulPlay}"> 
205								<img alt="${htmlUtil.escape(curEntry.getTitle(locale))}" src="${smallImage}" /> 
206							</div> 
207						</a> 
208					</div> 
209				</#if> 
210				 
211				<#if surtitre != ""> 
212				<p class="subtitle">${surtitre}</p> 
213				</#if> 
214				 
215				<h3> 
216					<a href="${link}"> 
217						${htmlUtil.escape(curEntry.getTitle(locale))} 
218					</a> 
219				</h3> 
220				 
221				<#if headline != "" || origin != "" || location != "" || date != ""> 
222				<div class="upper"> 
223					<#if headline != ""> 
224						<span class="headline"><@liferay_ui["message"] key="headline" /></span> 
225					</#if> 
226					<#if origin != ""> 
227						<span class="origine">${origin}</span> 
228					</#if> 
229					<#if date != ""> 
230						<span class="date">${date}</span> 
231					</#if> 
232					<#if location != ""> 
233						<span class="location">${location}</span> 
234					</#if> 
235				</div> 
236				</#if> 
237 
238				<#if smallImage != ""> 
239					<div class="visible-phone pull-left image-news ${simulPlay}"> 
240						<a href="${link}"> 
241							<img alt="${htmlUtil.escape(curEntry.getTitle(locale))}" src="${smallImage}" /> 
242						</a> 
243					</div> 
244				</#if> 
245				 
246				<#if content != ""> 
247					<p> 
248						${stringUtil.shorten(htmlUtil.extractText(content), 300)}	<#-- $mathTool.toInteger($abstractLength) --> 
249					</p> 
250				</#if> 
251 
252				<p class="read-more"> 
253					<a href="${link}">Read More</a> 
254				</p> 
255				 
256			</div> 
257        </#if> 
258    </#list> 
259</#if> 
260</div> 
261<#if 0==1> 
262$listTool.contains(stringUtil.split($metadataFields), "categories")) 
263<script> 
264$('.asset-category').each(function() { 
265	categorie = $( this ).html().split('»'); 
266	$( this ).html(categorie [categorie .length - 1]); 
267}); 
268</script> 
269</#if> 
270 
271<#macro getEditIcon entry> 
272	<#assign liferay_ui = taglibLiferayHash["/WEB-INF/tld/liferay-ui.tld"] /> 
273	<#if renderer.hasEditPermission(themeDisplay.getPermissionChecker())> 
274		<#assign redirectURL = renderResponse.createRenderURL() /> 
275 
276		${redirectURL.setParameter("struts_action", "/asset_publisher/add_asset_redirect")} 
277		${redirectURL.setWindowState("pop_up")} 
278 
279		<#assign editPortletURL = renderer.getURLEdit(renderRequest, renderResponse, windowStateFactory.getWindowState("pop_up"), redirectURL)!"" /> 
280 
281		<#if validator.isNotNull(editPortletURL)> 
282			<#assign title = entry.getTitle(locale) /> 
283			<div class="asset-actions lfr-meta-actions"> 
284			<@liferay_ui["icon"] 
285				image="edit" 
286				message=title 
287				url="javascript:Liferay.Util.openWindow({dialog: {}, id:'" + renderResponse.getNamespace() + "editAsset', title: '" + htmlUtil.escapeJS(title) + "', uri:'" + htmlUtil.escapeURL(editPortletURL.toString()) + "'});" 
288			/> 
289			</div> 
290		</#if> 
291	</#if> 
292</#macro> 
293 
294<#macro getNameLanguage lang > 
295	<#t> 
296	<#assign 
297		theme_settings = themeDisplay.getThemeSettings() 
298		active_bcs = getterUtil.getBoolean(theme_settings["active-bcs"]!"", true) 
299	/> 
300	<#t> 
301	<#if lang == "bs_BA"> 
302		<#if active_bcs?string == 'true'> 
303B/H/S<#t> 
304		<#else> 
305Bosanski<#t> 
306		</#if> 
307	<#else> 
308${lang.getDisplayLanguage(lang)?capitalize}<#t> 
309	</#if> 
310</#macro> 
311 
312<#macro getLocalLanguage lang > 
313	<#t> 
314	<#assign 
315		theme_settings = themeDisplay.getThemeSettings() 
316		active_bcs = getterUtil.getBoolean(theme_settings["active-bcs"]!"", true) 
317	/> 
318	<#t> 
319	<#if lang == "bs_BA" && active_bcs?string == 'true'> 
320B/H/S<#t> 
321	<#else> 
322${lang.language?upper_case}<#t> 
323	</#if> 
324</#macro>