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