An error occurred while processing the template.
Java method "com.liferay.osb.www.journal.cache.util.impl.OSBJournalContentImpl.getContent(long, String, String, String)" threw an exception when invoked on com.liferay.osb.www.journal.cache.util.impl.OSBJournalContentImpl object "co[email protected]2a035e27"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: ${journalContent.getContent(groupId?l...  [in template "ARTICLE_UTILITIES" in macro "get_journal_article_content" at line 70, column 17]
	- Reached through: @get_journal_article_content article  [in template "ARTICLE_UTILITIES" in macro "embed_journal_article" at line 61, column 17]
	- Reached through: @article_utilities.embed_journal_arti...  [in template "10155#10195#RESOURCE_RENDERER_V2" at line 155, column 25]
----
1<#include "${templatesPath}/components"> 
2 
3<#assign asset_category_local_service = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") /> 
4<#assign asset_entry_local_service = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") /> 
5<#assign asset_link_local_service = serviceLocator.findService("com.liferay.asset.kernel.service.AssetLinkLocalService") /> 
6<#assign asset_vocabulary_local_service = serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyLocalService") /> 
7<#assign dl_file_entry_local_service = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService") /> 
8<#assign journal_article_local_service = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") /> 
9<#assign portlet_file_repository_util = objectUtil("com.liferay.portal.kernel.portletfilerepository.PortletFileRepositoryUtil") /> 
10 
11<#assign service_context = objectUtil("com.liferay.portal.kernel.service.ServiceContextThreadLocal").getServiceContext() /> 
12 
13<#assign http_servlet_request = service_context.getRequest() /> 
14 
15<#assign theme_display = service_context.getThemeDisplay() /> 
16 
17<#assign plid = theme_display["plid"]?number /> 
18 
19<#assign folder_id = paramUtil.getLong(http_servlet_request, "folderId") /> 
20<#assign resource_id = paramUtil.getLong(http_servlet_request, "resourceId") /> 
21<#assign title = paramUtil.getString(http_servlet_request, "title") /> 
22<#assign passed_gated = paramUtil.getString(http_servlet_request, "gt") /> 
23 
24<#import "${templatesPath}/article_utilities" as article_utilities> 
25<#import "${templatesPath}/language_keys" as lang> 
26 
27<#assign has_update_permissions = article_utilities.has_update_permissions() /> 
28 
29<#function get_related_links class_name class_pk> 
30	<#assign asset_entry = asset_entry_local_service.getEntry(class_name, class_pk) /> 
31 
32	<#assign asset_entry_id = asset_entry.getEntryId() /> 
33 
34	<#assign related_links = asset_link_local_service.getDirectLinks(asset_entry_id) /> 
35 
36	<#return related_links> 
37</#function> 
38 
39<#assign vocabularies = ["Industry","Resource Type","Solution","Topic"] /> 
40 
41<#function map_categories categories> 
42	<#assign categories_map = {} /> 
43 
44	<#list categories as category> 
45		<#assign category_name = category.getName() /> 
46		<#assign vocabulary_name = asset_vocabulary_local_service.getVocabulary(category.getVocabularyId()).getName() /> 
47 
48		<#if vocabularies?seq_contains(vocabulary_name)> 
49			<#if categories_map[vocabulary_name]?has_content> 
50				<#assign categories_map = categories_map + {vocabulary_name: categories_map[vocabulary_name] + [category_name]} /> 
51			<#else> 
52				<#assign categories_map = categories_map + {vocabulary_name: [category_name]} /> 
53			</#if> 
54		</#if> 
55	</#list> 
56 
57	<#return categories_map /> 
58</#function> 
59 
60<p class="standard-padding"> 
61	<style> 
62		.left-caret:hover svg { 
63			transform: translateX(-0.5em); 
64
65	</style> 
66 
67	<a class="cta left-caret small-caps" href="/resources"> 
68		<svg height="10" width="6"><use xlink:href="#leftCaret"></use></svg> 
69 
70		${languageUtil.format(locale, "back-to-x", languageUtil.get(locale, "resources"))} 
71	</a> 
72</p> 
73 
74<div class="resource-display"> 
75	<#if dl_file_entry_local_service.fetchFileEntry(groupId, folder_id, title)??> 
76		<#assign dl_file_entry = dl_file_entry_local_service.fetchFileEntry(groupId, folder_id, title) /> 
77	<#elseif dl_file_entry_local_service.fetchDLFileEntry(resource_id)??> 
78		<#assign dl_file_entry = dl_file_entry_local_service.fetchDLFileEntry(resource_id) /> 
79	</#if> 
80 
81	<#if journal_article_local_service.fetchArticleByUrlTitle(groupId, title)??> 
82		<#assign article = journal_article_local_service.fetchArticleByUrlTitle(groupId, title) /> 
83	<#elseif journal_article_local_service.fetchArticle(groupId, resource_id?string)??> 
84		<#assign article = journal_article_local_service.fetchArticle(groupId, resource_id?string) /> 
85	</#if> 
86 
87	<#assign entries = [] /> 
88	<#assign related_links = [] /> 
89 
90	<#assign hs_form_wrapper = "hubspot-form-${.vars['reserved-article-id'].data}-wrapper" /> 
91 
92	<#if article??> 
93		<#assign related_links = get_related_links("com.liferay.journal.model.JournalArticle", article.getResourcePrimKey()) /> 
94 
95		<#assign default_title = article.getTitle(locale) + " | " + company.getName() /> 
96		<#assign expando_bridge = article.getExpandoBridge() /> 
97 
98		<#assign age_of_article = (.now?long - article.displayDate?long) / (1000 * 60 * 60 * 24) /> 
99 
100		<#assign document = saxReaderUtil.read(article.getContent()) /> 
101 
102		<#assign company_name = document.selectSingleNode("//dynamic-element[@name='company_name']/dynamic-content")! /> 
103		<#assign gated_teaser_content = document.selectSingleNode("//dynamic-element[@name='gated_teaser_content']/dynamic-content")! /> 
104		<#assign is_gated = document.selectSingleNode("//dynamic-element[@name='is_gated']/dynamic-content")! /> 
105		<#assign is_case_study = (age_of_article < 90) && ((passed_gated != "true") && ((is_gated.getData())?? && (is_gated.getData() == "true"))) /> 
106 
107		<#if is_case_study> 
108			<#import "${templatesPath}/asset_util" as asset_util> 
109 
110			<div class="block-container justify-center large-padding max-lg"> 
111				<div class="block left-block text-center title-image w30"> 
112					<@resource_icon /> 
113				</div> 
114 
115				<div class="block right-block w70"> 
116					<#if company_name.getData()?has_content> 
117						<h1 class="title"> 
118							${company_name.getData()} 
119						</h1> 
120					</#if> 
121 
122					<#if gated_teaser_content.getData()?has_content> 
123						<div class="gated-teaser-content"> 
124							${gated_teaser_content.getData()} 
125						</div> 
126					</#if> 
127 
128					<#assign hubspot_form_id = (hs_form_id.getData())! /> 
129 
130					<#if hubspot_form_id?has_content> 
131						<aside class="hs-form-container left-align"> 
132							<div class="hs-skeleton-wrapper"> 
133								<div class="hs-form-skeleton"> 
134									<div class="skeleton-input"></div> 
135									<div class="skeleton-input"></div> 
136									<div class="skeleton-input"></div> 
137								</div> 
138 
139								<div class="hs-form-wrapper" id="${hs_form_wrapper}"></div> 
140							</div> 
141						</aside> 
142 
143						<script id="${hs_form_wrapper}-script"> 
144							window.buildHubspotForm({ 
145								assetInfo: "", 
146								formId: '${hubspot_form_id}', 
147								locale: '${locale}', 
148								target: '#${hs_form_wrapper}' 
149							}); 
150						</script> 
151					</#if> 
152				</div> 
153			</div> 
154		<#else> 
155			<@article_utilities.embed_journal_article article /> 
156		</#if> 
157	<#elseif dl_file_entry??> 
158		<#assign categories = map_categories(asset_category_local_service.getCategories("com.liferay.document.library.kernel.model.DLFileEntry", dl_file_entry.getPrimaryKey())) /> 
159		<#assign default_title = dl_file_entry.getTitle() + " | " + company.getName() /> 
160		<#assign dl_file_entry_url = "/documents/" + groupId + "/" + dl_file_entry.getFolderId() + "/" + dl_file_entry.getTitle() /> 
161		<#assign expando_bridge = dl_file_entry.getExpandoBridge() /> 
162		<#assign hubspot_form_article_id = "691288" /> 
163		<#assign related_links = get_related_links("com.liferay.document.library.kernel.model.DLFileEntry", dl_file_entry.getPrimaryKey()) /> 
164 
165		<div class="block-container"> 
166			<div class="block long-form"> 
167				<#assign fieldsMap = dl_file_entry.getDDMFormValuesMap(dl_file_entry.getFileVersion().getFileVersionId()) /> 
168 
169				<#list fieldsMap?values as field> 
170					<#assign title = dl_file_entry.getTitle() /> 
171					<#assign display_title = fieldsMap["display_title"]! /> 
172 
173					<#assign cover_image = (field.getDDMFormFieldValuesMap().get("cover_image"))! /> 
174 
175					<#if display_title?has_content && display_title.getValue()?has_content> 
176						<#assign title = display_title.getValue() /> 
177					</#if> 
178				</#list> 
179 
180				<h1 class="long-form-title title w70"> 
181					${title} 
182				</h1> 
183 
184				<div class="block-container description-sidebar-wrapper flex-row-reverse no-padding"> 
185					<div class="block sidebar-info w30"> 
186						<#if categories?size gt 0> 
187							<@Sidebar title="Details"> 
188								<#list vocabularies as vocabulary> 
189									<#assign list = "" /> 
190 
191									<#if categories[vocabulary]?has_content> 
192										<#list categories[vocabulary] as category> 
193											<#if list?has_content> 
194												<#assign list = list + ", " + category /> 
195											<#else> 
196												<#assign list = category /> 
197											</#if> 
198										</#list> 
199 
200										<@InfoGroup direction="vertical" key="${vocabulary}" value="${list}" /> 
201									</#if> 
202								</#list> 
203							</@Sidebar> 
204						</#if> 
205 
206						<@SocialMediaIcons alignment="left" mode="share" title="Share this post" networks="facebook,twitter,linkedin" /> 
207					</div> 
208 
209					<div class="block regular-content w70"> 
210						<p class="description "> 
211							${dl_file_entry.getDescription()} 
212						</p> 
213 
214						<div class="block title-image" style="max-width:602px;"> 
215							<#assign version = dl_file_entry.getFileVersion()["version"] /> 
216							<#assign uuid = dl_file_entry.getUuid() /> 
217 
218							<object class="document-image-preview" data="/documents/${groupId}/${folder_id}/${title}/${uuid}/?version=${version}&previewFileIndex=1" type="image/png"> 
219								<@resource_icon /> 
220							</object> 
221						</div> 
222					</div> 
223				</div> 
224 
225				<div class="large-padding-vertical sharing-mobile"> 
226					<@SocialMediaIcons alignment="center" mode="share" networks="facebook,linkedin,twitter" title="" /> 
227				</div> 
228			</div> 
229 
230			<#assign embed_asset_id = dl_file_entry.getFileEntryId() /> 
231 
232			<#assign asset_info = "" /> 
233 
234			<#if embed_asset_id?has_content> 
235				<#import "${templatesPath}/asset_util" as asset_util> 
236 
237				<#assign asset_info = asset_util.buildAssetInfo(embed_asset_id) /> 
238			</#if> 
239 
240			<#assign hubspot_form_id = (hs_form_id.getData())! /> 
241 
242			<#if hubspot_form_id?has_content> 
243				<aside class="hs-form-container left-align"> 
244					<div class="hs-skeleton-wrapper"> 
245						<div class="hs-form-skeleton"> 
246							<div class="skeleton-input"></div> 
247							<div class="skeleton-input"></div> 
248							<div class="skeleton-input"></div> 
249						</div> 
250 
251						<div class="hs-form-wrapper" id="${hs_form_wrapper}"></div> 
252					</div> 
253				</aside> 
254 
255				<script id="${hs_form_wrapper}-script"> 
256					window.buildHubspotForm({ 
257						assetInfo: "${asset_info?json_string}", 
258						formId: '${hubspot_form_id}', 
259						locale: '${locale}', 
260						target: '#${hs_form_wrapper}' 
261					}); 
262				</script> 
263			</#if> 
264		</div> 
265	<#else> 
266		<p class="standard-padding"> 
267			${lang.localize("resource_not_found", "Resource not found.")} 
268		</p> 
269	</#if> 
270 
271	<#list related_links as entry> 
272		<#if entry_index < 3> 
273			<#assign related_asset_entry_id = entry.getEntryId2() /> 
274 
275			<#assign related_asset_entry = asset_entry_local_service.getEntry(related_asset_entry_id) /> 
276 
277			<#assign entries = entries + [related_asset_entry] /> 
278		</#if> 
279	</#list> 
280 
281	<#if entries?size gt 0> 
282		<div class="related-link section-padding"> 
283			<h3 class="text-center"> 
284				${lang.localize("you_might_be_interested_in", "You might be interested in...")} 
285			</h3> 
286 
287			<div class="resource-template standard-padding-vertical"> 
288				<#include "${templatesPath}/RESOURCES" /> 
289			</div> 
290		</div> 
291	</#if> 
292 
293	<#if expando_bridge??> 
294		<@article_utilities.set_seo_from_expando_bridge expando_bridge default_title companyId /> 
295	</#if> 
296</div> 
297 
298<#macro resource_icon> 
299	<svg class="document-image-preview" viewBox="0 0 145 188" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> 
300		<path class="secondary-fill" d="M144,118l-69,69h66.1c1.6,0,2.9-1.3,2.9-2.9V118z"/> 
301		<polygon class="alt-secondary-fill" points="75,187 135.3,187 105.1,156.9 "/> 
302		<path class="primary-fill" d="M83,1l61,61V4c0-1.7-1.3-3-3-3H83z"/> 
303		<polygon class="accent-fill" points="144,62 144,25.1 125.5,43.5 "/> 
304		<path class="element-stroke transparent-fill" d="M141.5,187.5H3.5c-1.6,0-3-1.4-3-3V3.5c0-1.6,1.4-3,3-3h138c1.6,0,3,1.4,3,3v181 C144.5,186.1,143.1,187.5,141.5,187.5z"/> 
305 
306		<svg viewBox="-.25 0 270 90" width="80%" x="10%"> 
307			<use xlink:href="#liferayLogo"></use> 
308		</svg> 
309	</svg> 
310</#macro> 
311 
312<style> 
313	.resource-display ul { 
314		margin-left: 1.75rem; 
315
316 
317	.resource-display .document-image-preview { 
318		margin-bottom: 3rem; 
319		max-width: 100%; 
320
321 
322	.resource-display .regular-content { 
323		padding-right: 3em; 
324
325 
326	.resource-display .sharing-mobile { 
327		display: none; 
328
329 
330	.resource-display .title-image { 
331		max-width: 600px; 
332		width: 100%; 
333
334 
335	@media all and (max-width: 768px) { 
336		.resource-display .regular-content { 
337			padding-right: initial; 
338
339 
340		.resource-display .sharing-mobile { 
341			display: block; 
342
343 
344		.resource-display .sidebar-info .social-media-icons { 
345			display: none; 
346
347
348</style>