Fehler bei der Verarbeitung der Vorlage.
Java method "com.sun.proxy.$Proxy681.getLatestArticle(long)" threw an exception when invoked on com.sun.proxy.$Proxy681 object "[email protected]22a8d275"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign jArt = JournalArticleLocalSer...  [in template "20116#20152#510999" at line 120, column 13]
----
1<#-- 
2Application display templates can be used to modify the look of a 
3specific application. 
4 
5Please use the left panel to quickly add commonly used variables. 
6Autocomplete is also available and can be invoked by typing "${". 
7--> 
8 
9<#assign DLFileEntryLocalService = serviceLocator.findService( 
10"com.liferay.document.library.kernel.service.DLFileEntryLocalService")> 
11<#assign DLFolderLocalService = serviceLocator.findService( 
12"com.liferay.document.library.kernel.service.DLFolderLocalService")> 
13<#assign JournalArticleLocalService = serviceLocator.findService( 
14"com.liferay.journal.service.JournalArticleLocalService")> 
15<#assign GroupLocalService = serviceLocator.findService( 
16"com.liferay.portal.kernel.service.GroupLocalService")> 
17<#assign LayoutSetService = serviceLocator.findService( 
18"com.liferay.portal.kernel.service.LayoutSetLocalService")> 
19<#assign AssetCategoryLocalService = serviceLocator.findService( 
20"com.liferay.asset.kernel.service.AssetCategoryLocalService")> 
21<#assign AssetVocabularyLocalService = serviceLocator.findService( 
22"com.liferay.asset.kernel.service.AssetVocabularyLocalService")> 
23<#assign AssetCategoryPropertyLocalService = serviceLocator.findService( 
24"com.liferay.asset.category.property.service.AssetCategoryPropertyLocalService")/> 
25<#assign PropertyFactoryUtil = serviceLocator.findService( 
26"com.liferay.portal.kernel.dao.orm.PropertyFactoryUtil") /> 
27 
28<#assign portletId = themeDisplay.getPortletDisplay().getId()> 
29<#assign locale = themeDisplay.getLocale()> 
30<#assign PortletPreferencesLocalService = serviceLocator.findService( 
31"com.liferay.portal.kernel.service.PortletPreferencesLocalService")/> 
32<#assign portletPreferencesXML = saxReaderUtil.read((PortletPreferencesLocalService.getPortletPreferences(themeDisplay.getPlid(), portletId)?first).getPreferences())> 
33<#assign TemplateCustomService = serviceLocator.findService("template.custom.services.TemplateCustomService") /> 
34 
35<#-- Macro used to get specific field text from an Asset Entry --> 
36<#macro entryNode document field> 
37    <#if document.selectSingleNode("/root/dynamic-element[@name='"+field+"']/dynamic-content")??> 
38    "${document.selectSingleNode("/root/dynamic-element[@name='"+field+"']/dynamic-content").getText()?js_string}" 
39    <#else> 
40    "" 
41    </#if> 
42</#macro> 
43 
44<#-- Macro used to get specific portlet preference --> 
45<#macro preference prefKey prefIndex defaultValue> 
46    <#if portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='"+prefKey+"-"+prefIndex+"']/value")??> 
47    "${portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='"+prefKey+"-"+prefIndex+"']/value").getText()?js_string}"<#return> 
48    <#else> 
49    "${defaultValue?js_string}"<#return> 
50    </#if> 
51</#macro> 
52 
53<div id="articleAdtDiv_${portletId}"></div> 
54<script> 
55    <#if portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='useSmallerHeadings']/value")?? && 
56    portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='useSmallerHeadings']/value").getText()?js_string == "true"> 
57        <#assign overrideHeadingSize = "heading3 mobile-heading2"> 
58    </#if> 
59 
60	<#assign multiArtBehavior = "Vertical Stack"> 
61	<#if portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='multiArticleBehavior']/value")??> 
62        <#assign multiArtBehavior = portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='multiArticleBehavior']/value").getText()?js_string> 
63    </#if> 
64 
65    <#assign fullWidthDisplay = "false"> 
66	<#if portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='fullWidthDisplay']/value")??> 
67        <#assign fullWidthDisplay = portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='fullWidthDisplay']/value").getText()?js_string> 
68    </#if> 
69 
70    <#assign featureDisplayType = "Image Left"> 
71	<#if portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='featureDisplayType']/value")??> 
72        <#assign featureDisplayType = portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='featureDisplayType']/value").getText()?js_string> 
73    </#if> 
74 
75    <#assign greyBackground = "false"> 
76	<#if portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='greyBackground']/value")??> 
77        <#assign greyBackground = portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='greyBackground']/value").getText()?js_string> 
78    </#if> 
79 
80    <#assign extraSpacer = "None"> 
81	<#if portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='extraSpacer']/value")??> 
82        <#assign extraSpacer = portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='extraSpacer']/value").getText()?js_string> 
83    </#if> 
84 
85    <#assign autoplay = "false"> 
86    <#if portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='autoPlay']/value")??> 
87        <#assign autoplay = portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='autoPlay']/value").getText()?js_string> 
88    </#if> 
89 
90	<#assign seeAllLink = ""> 
91	<#if portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='seeAllLink']/value")??> 
92        <#assign seeAllLink = portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='seeAllLink']/value").getText()?js_string> 
93    </#if> 
94 
95    <#assign seeAllLinkText = ""> 
96	<#if portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='seeAllLinkText']/value")??> 
97        <#assign seeAllLinkText = portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='seeAllLinkText']/value").getText()?js_string> 
98    </#if> 
99 
100    <#assign featureDisplayButtonType = "Visible"> 
101    <#if portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='featureDisplayButtonType']/value")??> 
102    <#assign featureDisplayButtonType = portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='featureDisplayButtonType']/value").getText()?js_string> 
103    </#if> 
104 
105    <#assign featureDisplayButtonText = ""> 
106    <#if portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='featureDisplayButtonText']/value")??> 
107        <#assign featureDisplayButtonText = portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='featureDisplayButtonText']/value").getText()?js_string> 
108    </#if> 
109 
110	<#assign gridTitle = ""> 
111	<#if portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='gridTitle']/value")??> 
112		<#assign gridTitle = portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='gridTitle']/value").getText()?js_string> 
113	</#if> 
114 
115	var entries = []; 
116 
117	<#if entries?has_content> 
118        <#list entries as curEntry> 
119 
120            <#assign jArt = JournalArticleLocalService.getLatestArticle(curEntry.getClassPK())> 
121            <#assign document = saxReaderUtil.read(jArt.getContentByLocale(themeDisplay.getLocale()))> 
122 
123            <#assign structureName = jArt.getDDMStructure().getName("en_US")> 
124 
125 
126            var componentType = "FEATURED_ARTICLE"; 
127 
128            var title = <@entryNode document=document field="ArticleTitle"/>; 
129 
130            var subtitle = <@entryNode document=document field="Subtitle"/>; 
131 
132            var description = <@entryNode document=document field="Description"/>; 
133            if (description == ""){ 
134				description = <@entryNode document=document field="Intro"/>; 
135
136 
137            var slug = <@entryNode document=document field="Slug"/>; 
138 
139            <#assign articleGroup = GroupLocalService.getGroup(jArt.getGroupId())> 
140 
141            <#if LayoutSetService.getLayoutSet(themeDisplay.getScopeGroupId(), false)?? 
142            && LayoutSetService.getLayoutSet(themeDisplay.getScopeGroupId(), false).getThemeSetting("isMicroSite", "regular")?? > 
143                <#assign isMicroSite = (LayoutSetService.getLayoutSet(themeDisplay.getScopeGroupId(), false).getThemeSetting("isMicroSite", "regular") == "true")> 
144            <#else> 
145                <#assign isMicroSite = false> 
146            </#if> 
147 
148            var image = '${TemplateCustomService.getDocumentURL(document,"ThumbnailSquare",themeDisplay)}';  
149            if (null == image || "" == image || ${(fullWidthDisplay == "true")?c}) { 
150				image = '${TemplateCustomService.getDocumentURL(document,"Thumbnail",themeDisplay)}'; 
151
152            if (null == image) { 
153				image = ""; 
154
155 
156            var componentData = { 
157				locale: "${locale}", 
158				structureName: "${structureName}", 
159				displayType: "${featureDisplayType}", 
160				slug: slug, 
161				title: title, 
162				subtitle: subtitle, 
163				description: description, 
164				image: image.trim(), 
165				groupFriendlyUrl: '${articleGroup.getFriendlyURL()}', 
166				isMicrosite: ${isMicroSite?c}, 
167				multiArtBehavior: '${multiArtBehavior}', 
168                featureDisplayButtonText: '${featureDisplayButtonText}', 
169                featureDisplayButtonType: '${featureDisplayButtonType}', 
170				componentType: componentType 
171			}; 
172 
173            <#if structureName == "Video"> 
174 
175                componentData.displayType = "Video"; 
176                componentData.link = <@entryNode document=document field="LinkURL"/>; 
177                componentData.videoUrl = <@entryNode document=document field="VideoURL"/>; 
178 
179            <#elseif structureName == "Article"> 
180 
181                var linkTargetOverride = <@entryNode document=document field="LinkTargetOverride"/>; 
182 
183                if (linkTargetOverride !== ""){ 
184					componentData.link = linkTargetOverride; 
185				} else { 
186                    <#assign assetCategories = AssetCategoryLocalService.getAssetEntryAssetCategories(curEntry.getEntryId())> 
187 
188					var articleCategories = []; 
189 
190                    <#list assetCategories as category> 
191                        <#assign categoryVocabulary = AssetVocabularyLocalService.getAssetVocabulary(category.getVocabularyId())> 
192                        <#assign categoryUrl = "#"> 
193 
194                        <#list AssetCategoryPropertyLocalService.getCategoryProperties(category.categoryId) as categoryProperty> 
195 
196                            <#if categoryProperty.key == "url"> 
197                                <#assign categoryUrl = categoryProperty.value> 
198                            </#if> 
199                        </#list> 
200	 
201                        articleCategories.push({ 
202							id: "${category.categoryId}", 
203							name: "${category.name}", 
204							url: "${categoryUrl}", 
205							vocabularyName: "${categoryVocabulary.getTitle(locale)}", 
206						}); 
207				    
208                    </#list> 
209 
210 
211					componentData.categories = articleCategories; 
212					componentData.urlTitle = "${jArt.getUrlTitle()?js_string}"; 
213
214 
215                var byline = <@entryNode document=document field="Byline"/>; 
216                if (byline != null && byline != ""){ 
217					componentData.byline = []; 
218				}; 
219 
220            <#elseif structureName == "External Article"> 
221 
222 
223 
224            <#-- All External Articles should display at /media-center/article, so populate categories accordingly --> 
225			<#-- var articleCategories = []; 
226                articleCategories.push({ 
227					id: "0", 
228					name: "Media Center", 
229					url: "media-center", 
230					vocabularyName: "Topics", 
231				}); 
232                articleCategories.push({ 
233					id: "1", 
234					name: "Article", 
235					url: "article", 
236					vocabularyName: "Article Type", 
237				}); 
238 
239                componentData.categories = articleCategories; 
240                componentData.urlTitle = "${jArt.getUrlTitle()?js_string}"; --> 
241 
242				componentData.link = <@entryNode document=document field="LinkURL"/>; 
243				componentData.isExternal = true; 
244 
245                var bylineSegments = []; 
246                var pubName = <@entryNode document=document field="PublicationName"/>; 
247 
248                if (pubName != null && pubName != ""){ 
249					bylineSegments.push(pubName); 
250					componentData.italicizeFirstByline = true; 
251				}; 
252 
253            <#--bylineSegments.push(<@entryNode document=document field="PublicationDate"/>); --> 
254                componentData.byline = bylineSegments; 
255 
256            <#elseif structureName == "Link"> 
257 
258                componentData.link = <@entryNode document=document field="LinkURL"/>; 
259                componentData.isExternal = true; 
260 
261                var bylineSegments = []; 
262 
263                <#assign linkja = JournalArticleLocalService.getLatestArticle(curEntry.getClassPK()) > 
264                <#assign linkdocument = saxReaderUtil.read(linkja.getContent())> 
265                <#assign linknodes = document.selectNodes("/root/dynamic-element[@name='BylineSegment']/dynamic-content")> 
266 
267                <#list linknodes as curN> 
268                    bylineSegments.push("${curN.getText()?js_string}"); 
269                </#list> 
270 
271                componentData.byline = bylineSegments; 
272                componentData.italicizeFirstByline = true; 
273 
274            </#if> 
275 
276            entries.push(componentData); 
277        </#list> 
278    </#if> 
279 
280	<#if multiArtBehavior == "Carousel"> 
281        var carouselProps = { 
282			entries: entries, 
283			gridTitle: "${gridTitle}", 
284			fullWidthDisplay: ${(fullWidthDisplay == "true")?c}, 
285			greyBackground: "${greyBackground}", 
286			autoplay: ${(autoplay == "true")?c} 
287		}; 
288 
289        ATK.React.Component.Carousel("articleAdtDiv_${portletId?js_string}", carouselProps); 
290    <#else> 
291        var extraProps = { 
292			multiArtBehavior: "${multiArtBehavior}", 
293			gridTitle: "${gridTitle}", 
294			fullWidthDisplay: "${fullWidthDisplay}", 
295			greyBackground: "${greyBackground}", 
296			extraSpacer: "${extraSpacer}", 
297			seeAllLink: "${seeAllLink}", 
298			seeAllLinkText: "${seeAllLinkText}" 
299		}; 
300        ATK.React.Component.FeaturedMultiDisplay("articleAdtDiv_${portletId?js_string}", extraProps, entries); 
301    </#if> 
302 
303</script>