Latest Sermon

An error occurred while processing the template.
Java method "com.sun.proxy.$Proxy110.getFileEntry(long)" threw an exception when invoked on com.sun.proxy.$Proxy110 object "com.lif[email protected]716486b8"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign fileEntry = DLAppLocalService...  [in template "20116#20152#37523" at line 135, column 17]
----
1<#assign AssetCategoryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService")> 
2<#assign AssetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService")> 
3<#assign AssetCategoryPropertyLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryPropertyLocalService")> 
4<#assign JournalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") /> 
5<#assign AssetRendererFactory = serviceLocator.findService("com.liferay.asset.kernel.model.AssetRendererFactory")> 
6<#assign DLAppLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLAppLocalService")> 
7 
8<#assign DLFileEntryTypeLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryTypeLocalService")> 
9<#assign DLFileEntryMetadataLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryMetadataLocalService")> 
10 
11<#assign StorageEngineManager = serviceLocator.findService("com.liferay.dynamic.data.mapping.kernel.StorageEngineManager")> 
12 
13<#assign DLFileEntryService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryService")> 
14<#assign DLFileEntryTypeService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryTypeService")> 
15<#assign DLFileVersionService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileVersionService")> 
16 
17<#assign whCategoryId = getterUtil.getLong("31988") /> 
18<#assign lhCategoryId = getterUtil.getLong("31989") /> 
19 
20<#assign seriesCategory = "" /> 
21<#assign seriesCategoryImage = "http://lorempixel.com/400/200/" /> 
22<#assign seriesCategoryTitle = "" /> 
23<#assign seriesVocabularyId = getterUtil.getLong("31943") /> 
24<#assign locationCategory = "" /> 
25<#assign locationVocabularyId = getterUtil.getLong("31987") /> 
26 
27<#assign test_series_id = getterUtil.getLong("34201") /> 
28 
29<#assign seriesCategory = AssetCategoryLocalService.getAssetCategory(test_series_id) /> 
30 
31<#if seriesCategory?has_content> 
32	<#assign seriesCategoryTitle = (seriesCategory.getTitle())! /> 
33 
34	<#assign articleId = AssetCategoryPropertyLocalService.getCategoryProperty(seriesCategory.getCategoryId(), "articleId").getValue() /> 
35 
36	<#assign article = JournalArticleLocalService.getLatestArticle(groupId, articleId)! /> 
37 
38	<#if article?has_content> 
39		<#assign document = saxReaderUtil.read(article.getContent()) /> 
40 
41		<#if document.selectSingleNode("//dynamic-element[@name='title']/dynamic-content").data?has_content> 
42			<#assign seriesCategoryTitle = document.selectSingleNode("//dynamic-element[@name='title']/dynamic-content").data! /> 
43		</#if> 
44 
45		<#if document.selectSingleNode("//dynamic-element[@name='image']/dynamic-content").data?has_content> 
46			<#assign seriesCategoryImage = document.selectSingleNode("//dynamic-element[@name='image']/dynamic-content").data /> 
47		</#if> 
48	</#if> 
49</#if> 
50 
51<#assign whittier_hills_sermon_id = getterUtil.getLong(whSermonId.data) /> 
52<#assign la_habra_sermon_id = getterUtil.getLong(lhSermonId.data) /> 
53 
54<div class="latest-sermons pa-lg flex wrap color-light justify-around" style="background: url(/documents/20143/41298/Unknown/4e50ffe4-30e4-08c0-1ddc-2505ea30abb6); background-size: cover;"> 
55	<h2 class="pv text-center w-100"> 
56		Sermons 
57	</h2> 
58 
59	<div class="bs-bb flex flex-column pa w-45"> 
60		<#assign fileEntry = DLAppLocalService.getFileEntry(whittier_hills_sermon_id) /> 
61		<#assign fileNameUrl = fileEntry.getTitle()?replace(" ","+") /> 
62		<#assign folderId = fileEntry.getFolderId() /> 
63 
64		<#assign url = themeDisplay.getPortalURL() + themeDisplay.getPathContext() + "/documents/" + themeDisplay.getScopeGroupId() + "/" + folderId + "/" + fileNameUrl /> 
65 
66        <h3 class="pv text-center"> 
67    		Whittier Hills 
68    	</h3> 
69    	 
70		<a class="background-overlay play-cover w-100" onclick="this.childNodes[1].paused ? this.childNodes[1].play() : this.childNodes[1].pause(); this.classList.toggle('playing-audio')" style="background-image: url(${seriesCategoryImage});"> 
71			<audio controls class="w-100"> 
72				<source src="${url}" type="audio/mpeg"> 
73				Your browser does not support the audio element. 
74			</audio> 
75 
76			<svg class="audio-icon audio-icon-initial" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 287.386 287.386" fill="currentColor"> 
77				<path d="M62.743,155.437v98.42c0,5.867,4.741,10.605,10.605,10.605c5.854,0,10.605-4.738,10.605-10.605v-98.42    c0-5.856-4.751-10.605-10.605-10.605C67.484,144.832,62.743,149.576,62.743,155.437z"/> 
78				<path d="M29.456,264.582h23.351v-116.85c0.064-0.56,0.166-1.119,0.166-1.693c0-50.412,40.69-91.42,90.698-91.42    c50.002,0,90.692,41.008,90.692,91.42c0,0.771,0.113,1.518,0.228,2.263v116.28h23.354c16.254,0,29.442-13.64,29.442-30.469    v-60.936c0-13.878-8.989-25.57-21.261-29.249c-1.129-66.971-55.608-121.124-122.45-121.124    c-66.86,0-121.347,54.158-122.465,121.15C8.956,147.638,0,159.32,0,173.187v60.926C0,250.932,13.187,264.582,29.456,264.582z"/> 
79				<path d="M203.454,155.437v98.42c0,5.867,4.748,10.605,10.604,10.605s10.604-4.738,10.604-10.605v-98.42    c0-5.856-4.748-10.605-10.604-10.605C208.191,144.832,203.454,149.576,203.454,155.437z"/> 
80			</svg> 
81 
82			<svg class="audio-icon audio-icon-hover" fill="currentColor" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1050 1050"> 
83				<path xmlns="http://www.w3.org/2000/svg" d="M68.2,936.1c0-45.3,0-839.6,0-870.8c0-40.5,41.9-70.6,83.3-46.9c33.2,19,696.1,401.8,752.7,434.5c37.2,21.5,36.5,72.8,0,94.3C863.4,571.3,198,956,149.8,982.8C114.5,1002.3,68.2,980.7,68.2,936.1z"/> 
84			</svg> 
85		</a> 
86 
87		<#assign fileEntryTypeId = getterUtil.getLong("31728") /> 
88		<#assign fileVersionId = getterUtil.getLong(fileEntry.getLatestFileVersion().getFileVersionId()) /> 
89 
90		<#assign dlFileEntryType = DLFileEntryTypeLocalService.getFileEntryType(fileEntryTypeId) /> 
91		<#assign ddmStructures = dlFileEntryType.getDDMStructures() /> 
92		<#assign ddmStructure = ddmStructures[0] /> 
93 
94		<#assign dlFileEntryMetadata = DLFileEntryMetadataLocalService.getFileEntryMetadata(ddmStructure.getStructureId(), fileVersionId) /> 
95 
96		<#assign ddmFormFieldValues = StorageEngineManager.getDDMFormValues(dlFileEntryMetadata.getDDMStorageId()).getDDMFormFieldValues() /> 
97 
98		<#assign fieldsMap = jsonFactoryUtil.createJSONObject() /> 
99 
100		<#list ddmFormFieldValues as field> 
101			<#assign void = fieldsMap.put(field.getName(), field.getValue().getString(locale)) /> 
102		</#list> 
103 
104		<#assign title = fieldsMap.getString("title") /> 
105		<#assign subtitle = fieldsMap.getString("subtitle") /> 
106		<#assign speaker = fieldsMap.getString("speaker") /> 
107		<#assign speakerTitle = fieldsMap.getString("speakerTitle") /> 
108		<#assign date = fieldsMap.getString("date") /> 
109		 
110		<#if validator.isNotNull(date)> 
111			<#assign date = dateUtil.parseDate("yyyy-MM-dd", date, locale)> 
112 
113			<#assign displayDate = dateUtil.getDate(date, "MMMM dd, yyyy", locale) /> 
114		</#if> 
115 
116		<h3 class="pt-sm"> 
117			${title} 
118		</h3> 
119 
120		<#if subtitle?has_content> 
121			<span class="subtitle fw-sb">${subtitle}</span> 
122		</#if> 
123 
124		<span class="date pb-sm">${displayDate}</span> 
125 
126		<#if speaker?has_content> 
127			<span class="speaker pb-sm fw-l">${speaker} - ${speakerTitle}</span> 
128		</#if> 
129 
130		<a class="color-light" href="/sermons/whittier-hills/-/categories/${categoryId!}">See more from this series</a> 
131		<a class="color-light" href="/sermons/whittier-hills">Whittier Hills Series Archive</a> 
132	</div> 
133 
134	<div class="bs-bb flex flex-column pa w-45"> 
135		<#assign fileEntry = DLAppLocalService.getFileEntry(la_habra_sermon_id) /> 
136		<#assign fileNameUrl = fileEntry.getTitle()?replace(" ","+") /> 
137		<#assign folderId = fileEntry.getFolderId() /> 
138 
139		<#assign url = themeDisplay.getPortalURL() + themeDisplay.getPathContext() + "/documents/" + themeDisplay.getScopeGroupId() + "/" + folderId + "/" + fileNameUrl /> 
140 
141        <h3 class="pv text-center"> 
142    		La Habra 
143    	</h3> 
144    	 
145		<a class="background-overlay play-cover w-100" onclick="this.childNodes[1].paused ? this.childNodes[1].play() : this.childNodes[1].pause(); this.classList.toggle('playing-audio')" style="background-image: url(${seriesCategoryImage});"> 
146			<audio controls class="w-100"> 
147				<source src="${url}" type="audio/mpeg"> 
148				Your browser does not support the audio element. 
149			</audio> 
150 
151			<svg class="audio-icon audio-icon-initial" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 287.386 287.386" fill="currentColor"> 
152				<path d="M62.743,155.437v98.42c0,5.867,4.741,10.605,10.605,10.605c5.854,0,10.605-4.738,10.605-10.605v-98.42    c0-5.856-4.751-10.605-10.605-10.605C67.484,144.832,62.743,149.576,62.743,155.437z"/> 
153				<path d="M29.456,264.582h23.351v-116.85c0.064-0.56,0.166-1.119,0.166-1.693c0-50.412,40.69-91.42,90.698-91.42    c50.002,0,90.692,41.008,90.692,91.42c0,0.771,0.113,1.518,0.228,2.263v116.28h23.354c16.254,0,29.442-13.64,29.442-30.469    v-60.936c0-13.878-8.989-25.57-21.261-29.249c-1.129-66.971-55.608-121.124-122.45-121.124    c-66.86,0-121.347,54.158-122.465,121.15C8.956,147.638,0,159.32,0,173.187v60.926C0,250.932,13.187,264.582,29.456,264.582z"/> 
154				<path d="M203.454,155.437v98.42c0,5.867,4.748,10.605,10.604,10.605s10.604-4.738,10.604-10.605v-98.42    c0-5.856-4.748-10.605-10.604-10.605C208.191,144.832,203.454,149.576,203.454,155.437z"/> 
155			</svg> 
156 
157			<svg class="audio-icon audio-icon-hover" fill="currentColor" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1050 1050"> 
158				<path xmlns="http://www.w3.org/2000/svg" d="M68.2,936.1c0-45.3,0-839.6,0-870.8c0-40.5,41.9-70.6,83.3-46.9c33.2,19,696.1,401.8,752.7,434.5c37.2,21.5,36.5,72.8,0,94.3C863.4,571.3,198,956,149.8,982.8C114.5,1002.3,68.2,980.7,68.2,936.1z"/> 
159			</svg> 
160		</a> 
161 
162 
163		<#assign fileEntryTypeId = getterUtil.getLong("31728") /> 
164		<#assign fileVersionId = getterUtil.getLong(fileEntry.getLatestFileVersion().getFileVersionId()) /> 
165 
166		<#assign dlFileEntryType = DLFileEntryTypeLocalService.getFileEntryType(fileEntryTypeId) /> 
167		<#assign ddmStructures = dlFileEntryType.getDDMStructures() /> 
168		<#assign ddmStructure = ddmStructures[0] /> 
169 
170		<#assign dlFileEntryMetadata = DLFileEntryMetadataLocalService.getFileEntryMetadata(ddmStructure.getStructureId(), fileVersionId) /> 
171 
172		<#assign ddmFormFieldValues = StorageEngineManager.getDDMFormValues(dlFileEntryMetadata.getDDMStorageId()).getDDMFormFieldValues() /> 
173 
174		<#assign fieldsMap = jsonFactoryUtil.createJSONObject() /> 
175 
176		<#list ddmFormFieldValues as field> 
177			<#assign void = fieldsMap.put(field.getName(), field.getValue().getString(locale)) /> 
178		</#list> 
179 
180		<#assign title = fieldsMap.getString("title") /> 
181		<#assign subtitle = fieldsMap.getString("subtitle") /> 
182		<#assign speaker = fieldsMap.getString("speaker") /> 
183		<#assign speakerTitle = fieldsMap.getString("speakerTitle") /> 
184		<#assign date = fieldsMap.getString("date") /> 
185		 
186		<#if validator.isNotNull(date)> 
187			<#assign date = dateUtil.parseDate("yyyy-MM-dd", date, locale)> 
188 
189			<#assign displayDate = dateUtil.getDate(date, "MMMM dd, yyyy", locale) /> 
190		</#if> 
191 
192		<h3 class="pt-sm"> 
193			${title} 
194		</h3> 
195 
196		<#if subtitle?has_content> 
197			<span class="subtitle fw-sb">${subtitle}</span> 
198		</#if> 
199 
200		<span class="date pb-sm">${displayDate}</span> 
201 
202		<#if speaker?has_content> 
203			<span class="speaker pb-sm fw-l">${speaker} - ${speakerTitle}</span> 
204		</#if> 
205 
206		<a class="color-light" href="/sermons/la-habra/-/categories/${categoryId!}">See more from this series</a> 
207		<a class="color-light" href="/sermons/la-habra">La Habra Series Archive</a> 
208	</div> 
209</div> 
210 
211 
212<style type="text/css"> 
213	.audio-icon { 
214		color: #FFF; 
215		height: 45%; 
216		left: 50%; 
217		position: absolute; 
218		top: 15%; 
219		transform: translateX(-50%); 
220		transition: opacity .25s; 
221
222 
223	.audio-icon-hover, .background-overlay:hover .audio-icon-initial, .playing-audio .audio-icon-initial { 
224		opacity: 0; 
225
226 
227	.audio-icon-initial, .background-overlay:hover .audio-icon-hover, .playing-audio .audio-icon-hover { 
228		opacity: 1; 
229
230 
231	.play-cover { 
232		background-position: center; 
233		background-size: cover; 
234		cursor: pointer; 
235		height: 25vw; 
236
237 
238	.play-cover.background-overlay:hover:before { 
239		opacity: .8; 
240
241 
242	.play-cover audio { 
243		bottom: 0; 
244		position: absolute; 
245
246</style>