Fehler bei der Verarbeitung der Vorlage.
Java method "com.sun.proxy.$Proxy184.getFileEntryByUuidAndGroupId(String, long)" threw an exception when invoked on com.sun.proxy.$Proxy184 object "com.liferay.portlet.documentlibrary.service.impl.DLFileEntryServiceImpl@7857bf26"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign dlFileEntry = DLFileEntryServ...  [in template "20116#20152#BKS-NEWSEINTRAG" in function "getDLFileEntryFromUrl" at line 169, column 17]
	- Reached through: #assign dlFileEntry = getDLFileEntryF...  [in template "20116#20152#BKS-NEWSEINTRAG" in function "getDLFileEntry" at line 144, column 25]
	- Reached through: #assign file = getDLFileEntry(cur_Doc...  [in template "20116#20152#BKS-NEWSEINTRAG" in macro "getDocumentDownloadLink" at line 117, column 17]
	- Reached through: @getDocumentDownloadLink cur_Document  [in template "20116#20152#BKS-NEWSEINTRAG" at line 92, column 105]
----
1<#assign 
2	ait_contentreplacer = taglibLiferayHash["/META-INF/ait-contentreplacer.tld"] 
3 
4	DLFileEntryService = serviceLocator.findService('com.liferay.document.library.kernel.service.DLFileEntryService') 
5	DLAppService = serviceLocator.findService('com.liferay.document.library.kernel.service.DLAppService') 
6	DLUtil = serviceLocator.findService('com.liferay.document.library.kernel.util.DLUtil') 
7/> 
8 
9<@ait_contentreplacer["replace-content"]> 
10 
11	<#assign  
12		labelDownloads = "Downloads" 
13		defaultDateFormat = "dd.MM.yyyy" 
14 
15		displaydate = .vars['reserved-article-display-date'].data 
16	/> 
17 
18	<#if VideoPreview??> 
19		<#assign 
20			videoPreview = VideoPreview 
21		/> 
22	<#else> 
23		<#assign videoPreview = '' /> 
24	</#if> 
25 
26	<div class="portlet-boundary portlet-borderless portlet-journal-content"> 
27		<div class="portlet"> 
28			<div class="portlet-content"> 
29				<div class=" portlet-content-container"> 
30					<div class="portlet-body"> 
31						<div class="journal-content-article"> 
32							<div class="content-large"> 
33								<#if HeadingDetail??> 
34                                    ${HeadingDetail.getData()} 
35								<#else> 
36                                    <#if Heading.getType() != "text"> 
37                                        ${Heading.getData()} 
38                                    <#else> 
39										<h1>${Heading.getData()}</h1> 
40                                    </#if> 
41								</#if> 
42								<p>${formatDate(displaydate, defaultDateFormat)}</p> 
43								<p>${Summary.getData()}</p> 
44							</div> 
45						</div> 
46					</div> 
47				</div> 
48			</div> 
49		</div> 
50	</div> 
51 
52	<div class="portlet-boundary portlet-bordered portlet-journal-content"> 
53		<div class="portlet"> 
54			<div class="portlet-content panel"> 
55				<div class="portlet-content-container"> 
56					<div class="portlet-body"> 
57						<div class="journal-content-article"> 
58							<@initMediaValues/> 
59							<#assign mediaData = getMediaTypeData(Video VideoFileEntry Image) /> 
60							<#if mediaData['hasMedia']> 
61								<figure class="content-media-element media-element-left ${mediaData['mediaCssClass']}"> 
62									<@renderMedia Video VideoFileEntry Image mediaData videoPreview/> 
63									 
64									<#if Caption.getData()?? && Caption.getData() != ""> 
65										<figcaption class="media-element-caption">${Caption.getData()}</figcaption> 
66									</#if> 
67								</figure> 
68							</#if> 
69							${Content.getData()} 
70						</div> 
71					</div> 
72				</div> 
73			</div> 
74		</div> 
75	</div> 
76 
77	<#if Document.getSiblings()?has_content && Document.getSiblings()?first.getData()?? && Document.getSiblings()?first.getData() != ""> 
78		<div class="portlet-boundary portlet-decorate portlet-small portlet-journal-content"> 
79			<div class="portlet"> 
80				<div class="portlet-content panel"> 
81					<div class="panel-heading portlet-title-container"> 
82						<h2 class="panel-title"><span class="portlet-title-text">${labelDownloads}</span></h2> 
83					</div> 
84					<div class="panel-body"> 
85						<div class=" portlet-content-container"> 
86							<div class="portlet-body"> 
87								<div class="journal-content-article"> 
88									<ul class="unstyled link-list"> 
89										<#list Document.getSiblings() as cur_Document> 
90											<#if cur_Document.getData()?? && cur_Document.getData() != ""> 
91												<li> 
92													<@getDocumentDownloadLink cur_Document/> 
93												</li> 
94											</#if> 
95										</#list> 
96									</ul> 
97								</div> 
98							</div> 
99						</div> 
100					</div> 
101				</div> 
102			</div> 
103		</div> 
104	</#if> 
105 
106	<#macro getDocumentDownloadLink cur_Document> 
107		<#assign  
108			linkText = '' 
109			linkTitle = '' 
110			linkSubText = '' 
111		 
112			linkUrl = cur_Document.getData() 
113			linkParams = 'target="_blank"' 
114			linkClass= 'link-download' 
115		/> 
116 
117		<#assign file = getDLFileEntry(cur_Document)> 
118 
119		<#assign 
120			linkText = file.getTitle() 
121			linkTitle = languageUtil.format(locale, "download-x", linkText, false) 
122			linkSubText = ' <span class="file-info">(' + file.getExtension()?upper_case + ' - ' + formatFilesize(file.getSize())  + ')</span>' 
123		/> 
124 
125		<a class="link-icon ${linkClass}" href="${linkUrl}" title="${linkTitle}" ${linkParams}>${linkText} ${linkSubText}</a> 
126	</#macro> 
127 
128	<#function getDLFileEntryAltText Image> 
129		<#if Image.getAttribute("id")?? && Image.getAttribute("id") != ""> 
130			<#return ""> 
131		<#else> 
132			<#assign dlFileEntry = getDLFileEntry(Image) > 
133			<#return dlFileEntry.getDescription()/> 
134		</#if> 
135	</#function> 
136 
137	<#function getDLFileEntry fileEntry> 
138		<#assign dlFileEntry = ''> 
139		<#if fileEntry.getAttribute("fileEntryId")?? && fileEntry.getAttribute("fileEntryId") != ""> 
140			<#assign 
141			dlFileEntry = DLFileEntryService.getFileEntry(fileEntry.getAttribute("fileEntryId")?number) 
142			/> 
143		<#else> 
144			<#assign 
145			dlFileEntry = getDLFileEntryFromUrl(fileEntry.getData()) 
146			/> 
147		</#if> 
148		<#return dlFileEntry> 
149	</#function> 
150 
151	<#function getDLFileEntryFromUrl fileUrl> 
152		<#assign counter = 0 > 
153		<#list "${fileUrl}"?split("/") as pathSegemtent> 
154			<#if counter == 2> 
155				<#assign groupId = pathSegemtent?number > 
156			</#if> 
157			<#if counter == 5> 
158				<#assign subCounter = 0 > 
159				<#list "${pathSegemtent}"?split("?") as subSegemtent> 
160					<#if subCounter == 0> 
161						<#assign uuId = subSegemtent > 
162					</#if> 
163					<#assign subCounter = subCounter+1 > 
164				</#list> 
165			</#if> 
166			<#assign counter = counter+1 > 
167		</#list> 
168 
169		<#assign dlFileEntry = DLFileEntryService.getFileEntryByUuidAndGroupId(uuId,groupId) > 
170 
171		<#return dlFileEntry> 
172	</#function> 
173 
174	<#function formatFilesize fileSize> 
175		<#assign GB = 1000000000 /> 
176		<#assign MB = 1000000 /> 
177		<#assign KB = 1000 /> 
178 
179		<#if fileSize < MB > 
180			<#assign val = fileSize / 1000 /> 
181			<#return val?string("###,##0.#")+'KB' > 
182		<#elseif fileSize < GB > 
183			<#assign val = fileSize / 1000000 /> 
184			<#return val?string("###,##0.#")+'MB' > 
185		<#else> 
186			<#assign val = fileSize /> 
187			<#return val?string("###,##0.#")+'B' > 
188		</#if> 
189	</#function> 
190 
191	<#function formatDate dateString dateTimeFormat> 
192		<#-- Expects dateString to be RFC-822 date-time formatted--> 
193		<#assign dateStringPattern = "EEE, dd MMM yyyy HH:mm:ss Z"/> 
194 
195		<#assign dateItem = dateUtil.parseDate(dateStringPattern, dateString, localeUtil.getDefault())> 
196 
197		<#assign formatDateString = dateUtil.getDate(dateItem, dateTimeFormat, locale, timeZone)> 
198 
199		<#return formatDateString /> 
200	</#function> 
201 
202	<#macro initMediaValues> 
203	<#-- If either one of the needed Media Types is not present create the Variable with an empty string --> 
204	<#-- needed since some Articles might not have them --> 
205		<#if !Video??> 
206			<#assign Video = ''/> 
207		</#if> 
208		<#if !VideoFiles??> 
209			<#assign VideoFileEntry = ''/> 
210		<#else> 
211			<#assign 
212			VideoFileEntry = VideoFiles.VideoFileEntry 
213			/> 
214		</#if> 
215		<#if !Image??> 
216			<#assign Image = ''/> 
217		</#if> 
218	</#macro> 
219 
220	<#macro renderYoutubeVideo videoId> 
221		<iframe 
222				src="https://www.youtube-nocookie.com/embed/${videoId}?color=white&amp;controls=2&amp;hl=${locale.getLanguage()}&amp;iv_load_policy=3&amp;modestbranding=1&amp;rel=0&amp;showinfo=0" 
223				frameborder="0" 
224				allow="autoplay; encrypted-media" 
225				allowfullscreen 
226		></iframe> 
227	</#macro> 
228 
229	<#macro renderVideoPlayer videoFiles videoPreview videoPlayerId=randomNamespace> 
230		<#assign 
231		previewImage = '' 
232 
233		theme_path = themeDisplay.getPathThemeCss() 
234 
235		videojsCssPath = theme_path + '/theme/video-js/video-js.min.css' 
236		/> 
237 
238		<#if !videoPreview?is_string > 
239			<#if videoPreview.getData()?? && videoPreview.getData() != ''> 
240				<#assign 
241				previewImage = videoPreview.getData() 
242				/> 
243			</#if>  
244		</#if> 
245 
246		<video id="media_teaser_video_${videoPlayerId}" class="video-js vjs-fluid vjs-big-play-centered video-js-bks"> 
247			<#list videoFiles.getSiblings() as videoFile> 
248				<#if videoFile.getData()?? && videoFile.getData() != ''> 
249					<#assign 
250					videoFileEntry = getFileEntryFromUrl(videoFile.getData()) 
251					mimeType = videoFileEntry.getMimeType() 
252					/> 
253					<#if previewImage == ''> 
254						<#assign 
255						previewImage = DLUtil.getImagePreviewURL(videoFileEntry, videoFileEntry.getFileVersion(), themeDisplay) 
256						/> 
257					</#if> 
258					<source src="${videoFile.getData()}" type="${mimeType}"> 
259				</#if> 
260			</#list> 
261			<p class="vjs-no-js">Um dieses Video anzusehen, aktivieren Sie bitte JavaScript, und verwenden Sie einen Browser der <a href="http://videojs.com/html5-video-support/" target="_blank">Videos im HTML5 Standard unterstützt.</a></p> 
262		</video> 
263 
264		<script> 
265			Liferay.Loader.require([ 
266						"videojs" 
267					], 
268					function(videojs) { 
269						var allCssElements=document.getElementsByTagName("link"); 
270						var cssAlreadyExists = false; 
271 
272						for (var i=allCssElements.length; i>=0; i--){ //search backwards within nodelist for matching elements to remove 
273							if (allCssElements[i] && allCssElements[i].getAttribute("href")!=null && allCssElements[i].getAttribute("href").indexOf("${videojsCssPath}")!=-1){ 
274								cssAlreadyExists = true; 
275
276
277 
278						if (!cssAlreadyExists) { 
279							var newCssFile=document.createElement("link"); 
280							newCssFile.setAttribute("rel", "stylesheet"); 
281							newCssFile.setAttribute("type", "text/css"); 
282							newCssFile.setAttribute("href", "${videojsCssPath}"); 
283 
284							document.getElementsByTagName('head')[0].appendChild(newCssFile); 
285
286 
287						videojs('media_teaser_video_${videoPlayerId}', { 
288							controls: true, 
289							autoplay: false, 
290							preload: 'auto', 
291							aspectRatio: "16:9", 
292							fluid: 1, 
293							language: "${locale.getLanguage()}", 
294							poster: "${previewImage}" 
295						}); 
296 
297						Liferay.on('startNavigate', function() { 
298							videojs('media_teaser_video_${videoPlayerId}').dispose(); 
299						}); 
300					}, 
301					function(error) { 
302						console.error(error); 
303
304			); 
305		</script> 
306	</#macro> 
307 
308	<#-- Get FileEntry NOT DlFileEntry!!! --> 
309	<#function getFileEntryFromUrl fileUrl> 
310		<#assign counter = 0 > 
311		<#list "${fileUrl}"?split("/") as pathSegemtent> 
312			<#if counter == 2> 
313				<#assign groupId = pathSegemtent?number > 
314			</#if> 
315			<#if counter == 5> 
316				<#assign subCounter = 0 > 
317				<#list "${pathSegemtent}"?split("?") as subSegemtent> 
318					<#if subCounter == 0> 
319						<#assign uuId = subSegemtent > 
320					</#if> 
321					<#assign subCounter = subCounter+1 > 
322				</#list> 
323			</#if> 
324			<#assign counter = counter+1 > 
325		</#list> 
326 
327		<#assign fileEntry = DLAppService.getFileEntryByUuidAndGroupId(uuId,groupId) > 
328 
329		<#return fileEntry> 
330	</#function> 
331 
332	<#function getYoutubeIdFromUrl url> 
333		<#assign pathSegments = "${url}"?split("/") > 
334		<#return pathSegments?last> 
335	</#function> 
336 
337	<#function getMediaTypeData Video VideoFileEntries Image> 
338		<#assign 
339		mediaTypeData = { 
340		"hasMedia" : false, 
341		"mediaType" : "", 
342		"mediaCssClass" : "" 
343
344		/> 
345		<#if Video?? && Video?has_content && Video.getData()?contains("youtube") || Video.getData()?contains("youtu.be")> 
346			<#assign 
347			mediaTypeData = { 
348			"hasMedia" : true, 
349			"mediaType" : "youtube", 
350			"mediaCssClass" : "media-element-fixed-width" 
351
352			/> 
353		<#elseif VideoFileEntries?? && VideoFileEntries?has_content && VideoFileEntries.getSiblings()?has_content> 
354			<#list VideoFileEntries.getSiblings() as videoFileEntryItem> 
355				<#if videoFileEntryItem.getData()?? && videoFileEntryItem.getData() != ''> 
356					<#assign 
357					mediaTypeData = { 
358					"hasMedia" : true, 
359					"mediaType" : "videofile", 
360					"mediaCssClass" : "media-element-fixed-width" 
361
362					/> 
363				</#if> 
364			</#list> 
365		</#if> 
366		<#if !mediaTypeData['hasMedia'] && Image?? && Image?has_content && Image.getData()?? && Image.getData() != ""> 
367			<#assign 
368			mediaTypeData = { 
369			"hasMedia" : true, 
370			"mediaType" : "image", 
371			"mediaCssClass" : "" 
372
373			/> 
374		</#if> 
375		<#return mediaTypeData/> 
376	</#function> 
377 
378	<#macro renderMedia Video VideoFileEntries Image mediaTypeData VideoPreview mediaId=randomNamespace> 
379		<#switch mediaTypeData['mediaType']> 
380			<#case 'youtube'> 
381				<#assign youtubeId = getYoutubeIdFromUrl(Video.getData()) /> 
382				<div class="aspect-ratio aspect-ratio-16-to-9 aspect-ratio-top"> 
383					<@renderYoutubeVideo youtubeId/> 
384				</div> 
385				<#break> 
386			<#case 'videofile'> 
387				<@renderVideoPlayer VideoFileEntries VideoPreview mediaId/> 
388				<#break> 
389			<#case 'image'> 
390				<#assign 
391				altText = Image.getAttribute("alt") 
392				/> 
393				<#if !Image.getAttribute("alt")?? || Image.getAttribute("alt") == ""> 
394					<#assign 
395					altText = getDLFileEntryAltText(Image) 
396					/> 
397				</#if> 
398				<img data-fileentryid="${Image.getAttribute("fileEntryId")}" alt="${altText}" src="${Image.getData()}" /> 
399				<#break> 
400		</#switch> 
401	</#macro> 
402 
403</@>