Fehler bei der Verarbeitung der Vorlage.
Java method "com.sun.proxy.$Proxy629.getLatestArticle(long)" threw an exception when invoked on com.sun.proxy.$Proxy629 object "com.liferay.journal.service.impl.JournalArticleLocalServiceImpl@4b66ccf7"; 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 105, 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 
33<#-- 
347.4 Upgrade Start - portlet perferences would not be stored as xml, see https://github.com/liferay/liferay-portal/blob/master/readme/BREAKING_CHANGES.markdown#what-changed-11 
35 
36assign portletPreferencesXML = saxReaderUtil.read((PortletPreferencesLocalService.getPortletPreferences(themeDisplay.getPlid(), portletId)?first).getPreferences()) 
37--> 
38 
39<#assign plid = themeDisplay.getPlid()> 
40 
41<#assign portletPreferences = PortletPreferencesLocalService.getPortletPreferences(plid, portletId)?first /> 
42 
43<#assign preferences = PortletPreferencesLocalService.fetchPreferences(portletPreferences.getCompanyId(), portletPreferences.getOwnerId(), portletPreferences.getOwnerType(), plid, portletId) /> 
44 
45<#-- 
467.4 Upgrade End 
47--> 
48 
49<#assign TemplateCustomService = serviceLocator.findService("template.custom.services.TemplateCustomService") /> 
50 
51<#-- Macro used to get specific field text from an Asset Entry --> 
52<#macro entryNode document field> 
53    <#if document.selectSingleNode("/root/dynamic-element[@name='"+field+"']/dynamic-content")??> 
54    "${document.selectSingleNode("/root/dynamic-element[@name='"+field+"']/dynamic-content").getText()?js_string}" 
55    <#else> 
56    "" 
57    </#if> 
58</#macro> 
59 
60<#-- Macro used to get specific portlet preference --> 
61 
62<#-- 7.4 Upgrade question: where do we need this macro? --> 
63 
64<#macro preference prefKey prefIndex defaultValue> 
65    <#if portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='"+prefKey+"-"+prefIndex+"']/value")??> 
66    "${portletPreferencesXML.selectSingleNode("/portlet-preferences/preference[name='"+prefKey+"-"+prefIndex+"']/value").getText()?js_string}"<#return> 
67    <#else> 
68    "${defaultValue?js_string}"<#return> 
69    </#if> 
70</#macro> 
71 
72<div id="articleAdtDiv_${portletId}"></div> 
73<script> 
74    <#if preferences.getValue("useSmallerHeadings", "false")?js_string == "true"> 
75        <#assign overrideHeadingSize = "heading3 mobile-heading2"> 
76    </#if> 
77 
78    <#assign multiArtBehavior = preferences.getValue("multiArticleBehavior", "Vertical Stack")?js_string> 
79 
80    <#assign fullWidthDisplay = preferences.getValue("fullWidthDisplay", "false")?js_string> 
81 
82    <#assign featureDisplayType = preferences.getValue("featureDisplayType", "Image Left")?js_string> 
83 
84    <#assign greyBackground = preferences.getValue("greyBackground", "false")?js_string> 
85 
86    <#assign extraSpacer = preferences.getValue("extraSpacer", "None")?js_string> 
87 
88    <#assign autoplay = preferences.getValue("autoPlay", "false")?js_string> 
89 
90    <#assign seeAllLink = preferences.getValue("seeAllLink", "")?js_string> 
91 
92    <#assign seeAllLinkText = preferences.getValue("seeAllLinkText", "")?js_string> 
93 
94    <#assign featureDisplayButtonType = preferences.getValue("featureDisplayButtonType", "Visible")?js_string> 
95 
96    <#assign featureDisplayButtonText = preferences.getValue("featureDisplayButtonText", "")?js_string> 
97 
98    <#assign gridTitle = preferences.getValue("gridTitle", "")?js_string> 
99 
100	var entries = []; 
101 
102	<#if entries?has_content> 
103        <#list entries as curEntry> 
104 
105            <#assign jArt = JournalArticleLocalService.getLatestArticle(curEntry.getClassPK())> 
106            <#assign document = saxReaderUtil.read(jArt.getContentByLocale(themeDisplay.getLocale()))> 
107 
108            <#assign structureName = jArt.getDDMStructure().getName("en_US")> 
109 
110 
111            var componentType = "FEATURED_ARTICLE"; 
112            var voiceSearch = "featured-article"; 
113 
114            var title = <@entryNode document=document field="ArticleTitle"/>; 
115 
116            var subtitle = <@entryNode document=document field="Subtitle"/>; 
117 
118            var description = <@entryNode document=document field="Description"/>; 
119            if (description == ""){ 
120				description = <@entryNode document=document field="Intro"/>; 
121
122 
123            var slug = <@entryNode document=document field="Slug"/>; 
124 
125            <#assign articleGroup = GroupLocalService.getGroup(jArt.getGroupId())> 
126 
127            <#if LayoutSetService.getLayoutSet(themeDisplay.getScopeGroupId(), false)?? 
128            && LayoutSetService.getLayoutSet(themeDisplay.getScopeGroupId(), false).getThemeSetting("isMicroSite", "regular")?? > 
129                <#assign isMicroSite = (LayoutSetService.getLayoutSet(themeDisplay.getScopeGroupId(), false).getThemeSetting("isMicroSite", "regular") == "true")> 
130            <#else> 
131                <#assign isMicroSite = false> 
132            </#if> 
133 
134            var image = '${TemplateCustomService.getDocumentURL(document,"ThumbnailSquare",themeDisplay)}';  
135            if (null == image || "" == image || ${(fullWidthDisplay == "true")?c}) { 
136				image = '${TemplateCustomService.getDocumentURL(document,"Thumbnail",themeDisplay)}'; 
137
138            if (null == image) { 
139				image = ""; 
140
141 
142            var componentData = { 
143				locale: "${locale}", 
144				structureName: "${structureName}", 
145				displayType: "${featureDisplayType}", 
146				slug: slug, 
147				title: title, 
148				subtitle: subtitle, 
149				description: description, 
150				image: image.trim(), 
151				groupFriendlyUrl: '${articleGroup.getFriendlyURL()}', 
152				isMicrosite: ${isMicroSite?c}, 
153				multiArtBehavior: '${multiArtBehavior}', 
154                featureDisplayButtonText: '${featureDisplayButtonText}', 
155                featureDisplayButtonType: '${featureDisplayButtonType}', 
156				componentType: componentType, 
157				voiceSearch: voiceSearch 
158			}; 
159 
160            <#if structureName == "Video"> 
161 
162                componentData.displayType = "Video"; 
163                componentData.link = <@entryNode document=document field="LinkURL"/>; 
164                componentData.videoUrl = <@entryNode document=document field="VideoURL"/>; 
165 
166            <#elseif structureName == "Article"> 
167 
168                var linkTargetOverride = <@entryNode document=document field="LinkTargetOverride"/>; 
169 
170                if (linkTargetOverride !== ""){ 
171					componentData.link = linkTargetOverride; 
172				} else { 
173                    <#assign assetCategories = AssetCategoryLocalService.getCategories(curEntry.getClassNameId(), curEntry.getClassPK())> 
174 
175					var articleCategories = []; 
176 
177                    <#list assetCategories as category> 
178                        <#assign categoryVocabulary = AssetVocabularyLocalService.getAssetVocabulary(category.getVocabularyId())> 
179                        <#assign categoryUrl = "#"> 
180 
181                        <#list AssetCategoryPropertyLocalService.getCategoryProperties(category.categoryId) as categoryProperty> 
182 
183                            <#if categoryProperty.key == "url"> 
184                                <#assign categoryUrl = categoryProperty.value> 
185                            </#if> 
186                        </#list> 
187	 
188                        articleCategories.push({ 
189							id: "${category.categoryId}", 
190							name: "${category.name}", 
191							url: "${categoryUrl}", 
192							vocabularyName: "${categoryVocabulary.getTitle(locale)}", 
193						}); 
194				    
195                    </#list> 
196 
197 
198					componentData.categories = articleCategories; 
199					componentData.urlTitle = "${jArt.getUrlTitle()?js_string}"; 
200
201 
202                var byline = <@entryNode document=document field="Byline"/>; 
203                if (byline != null && byline != ""){ 
204					componentData.byline = []; 
205				}; 
206 
207            <#elseif structureName == "External Article"> 
208 
209 
210 
211            <#-- All External Articles should display at /media-center/article, so populate categories accordingly --> 
212			<#-- var articleCategories = []; 
213                articleCategories.push({ 
214					id: "0", 
215					name: "Media Center", 
216					url: "media-center", 
217					vocabularyName: "Topics", 
218				}); 
219                articleCategories.push({ 
220					id: "1", 
221					name: "Article", 
222					url: "article", 
223					vocabularyName: "Article Type", 
224				}); 
225 
226                componentData.categories = articleCategories; 
227                componentData.urlTitle = "${jArt.getUrlTitle()?js_string}"; --> 
228 
229				componentData.link = <@entryNode document=document field="LinkURL"/>; 
230				componentData.isExternal = true; 
231 
232                var bylineSegments = []; 
233                var pubName = <@entryNode document=document field="PublicationName"/>; 
234 
235                if (pubName != null && pubName != ""){ 
236					bylineSegments.push(pubName); 
237					componentData.italicizeFirstByline = true; 
238				}; 
239 
240            <#--bylineSegments.push(<@entryNode document=document field="PublicationDate"/>); --> 
241                componentData.byline = bylineSegments; 
242 
243            <#elseif structureName == "Link"> 
244 
245                componentData.link = <@entryNode document=document field="LinkURL"/>; 
246                componentData.isExternal = true; 
247 
248                var bylineSegments = []; 
249 
250                <#assign linkja = JournalArticleLocalService.getLatestArticle(curEntry.getClassPK()) > 
251                <#assign linkdocument = saxReaderUtil.read(linkja.getContent())> 
252                <#assign linknodes = document.selectNodes("/root/dynamic-element[@name='BylineSegment']/dynamic-content")> 
253 
254                <#list linknodes as curN> 
255                    bylineSegments.push("${curN.getText()?js_string}"); 
256                </#list> 
257 
258                componentData.byline = bylineSegments; 
259                componentData.italicizeFirstByline = true; 
260 
261            </#if> 
262 
263            entries.push(componentData); 
264        </#list> 
265    </#if> 
266 
267	<#if multiArtBehavior == "Carousel"> 
268        var carouselProps = { 
269			entries: entries, 
270			gridTitle: "${gridTitle}", 
271			fullWidthDisplay: ${(fullWidthDisplay == "true")?c}, 
272			greyBackground: "${greyBackground}", 
273			autoplay: ${(autoplay == "true")?c} 
274		}; 
275 
276        ATK.React.Component.Carousel("articleAdtDiv_${portletId?js_string}", carouselProps); 
277    <#else> 
278    	var componentVoiceSearch = "featured-article"; 
279        var extraProps = { 
280			multiArtBehavior: "${multiArtBehavior}", 
281			gridTitle: "${gridTitle}", 
282			fullWidthDisplay: "${fullWidthDisplay}", 
283			greyBackground: "${greyBackground}", 
284			extraSpacer: "${extraSpacer}", 
285			seeAllLink: "${seeAllLink}", 
286			seeAllLinkText: "${seeAllLinkText}", 
287			componentVoiceSearch: componentVoiceSearch 
288		}; 
289        ATK.React.Component.FeaturedMultiDisplay("articleAdtDiv_${portletId?js_string}", extraProps, entries); 
290    </#if> 
291 
292</script>