Learn and Plan — Annuities

An error occurred while processing the template.
Java method "static com.liferay.document.library.kernel.service.DLAppLocalServiceUtil.getFileEntryByUuidAndGroupId(String, long)" threw an exception; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign dlFile = dlAppLocalServiceUti...  [in template "20101#20128#656728065" at line 168, column 41]
----
1<#assign httpServletRequest = portalUtil.getHttpServletRequest(renderRequest)> 
2<#assign originalServletRequest = portalUtil.getOriginalServletRequest(httpServletRequest)> 
3<#assign httpSession = httpServletRequest.getSession()> 
4<#assign originalLocale = .locale> 
5<#setting locale = localeUtil.getDefault()> 
6 
7<#assign AssetCategoryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService")> 
8 
9<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")> 
10<#assign groupLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.GroupLocalService")> 
11<#assign layoutLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService")> 
12<#assign dlAppLocalServiceUtil = staticUtil["com.liferay.document.library.kernel.service.DLAppLocalServiceUtil"] > 
13<#assign dlUtil = staticUtil["com.liferay.document.library.kernel.util.DLUtil"] > 
14 
15<#assign currentGroup = groupLocalService.getGroup(groupId) > 
16 
17 
18<#-- 
19<#if request.getParameter("p_r_p_categoryId")??> 
20    <div>hello . found it</div> 
21    <#assign CurrentCategoryID = request.getParameter("p_r_p_categoryId")> 
22    <div> Current p_r_p_categoryId : ${CurrentCategoryID}</div> 
23</#if> 
24--> 
25 
26 
27<div> 
28<!--div class="article-container ml-3"--> 
29	<div class="card-article-list"> 
30	     
31	    
32		<#if entries?has_content> 
33		 
34		 
35		<#-- START TEST LOOP --> 
36		<#-- 
37		    <#list entries as curEntry> 
38		     
39		        ${curEntry.getClassPK()} 
40		         
41		        <#assign rootElement = document.getRootElement()/> 
42				<#assign elements = rootElement.elements()/> 
43				 
44				<#list elements as dynamicElement> 
45					<#assign attributeValue = dynamicElement.attributeValue("name")/> 
46				    
47					<#if attributeValue == "linkToPage"> 
48							<#assign linkToPage = dynamicElement.element("dynamic-content")/> 
49					</#if> 
50					   
51				</#list> 
52				 
53				${linkToPage}<br> 
54		         
55		     
56		    </#list> 
57		--> 
58		<#-- END TEST LOOP --> 
59		     
60		     
61		 
62			<#list entries as curEntry> 
63	 
64	 
65<#-- 
66<div class="article-categories mb-3"> 
67    <#assign categoryList = AssetCategoryLocalService.getCategories("com.liferay.journal.model.JournalArticle", getterUtil.getLong(curEntry.getClassPK()))> 
68    <#list categoryList as cat> 
69        <#if cat.getName() != "general"> 
70            <a href="/plan-for-tomorrow/-/categories/${cat.getCategoryId()}?p_r_p_categoryId=${cat.getCategoryId()}" class="badge badge-secondary">${cat.getName()}</a> 
71        </#if> 
72	</#list> 
73</div> 
74--> 
75 
76 
77				 
78				<#assign journalArticle = ""/> 
79				<#assign journalArticle = journalArticleLocalService.getLatestArticle(curEntry.getClassPK())/> 
80				 
81				<#assign document = saxReaderUtil.read(journalArticle.getContent())/> 
82				 
83				<#assign documentMedia = ""/> 
84				<#assign articleTitle = ""/> 
85				<#assign shortDescription = ""/> 
86				<#assign linkToPage = ""/> 
87				<#assign altImage = ""/> 
88 
89				<#assign relativeURL = ""/> 
90				<#assign Image = ""/> 
91				 
92				<#assign rootElement = document.getRootElement()/> 
93				<#assign elements = rootElement.elements()/> 
94				 
95				<#list elements as dynamicElement> 
96					<#assign attributeValue = dynamicElement.attributeValue("name")/> 
97				    
98					<#if attributeValue == "documentMedia"> 
99						<#assign documentMedia = dynamicElement.element("dynamic-content")/> 
100						<#assign documentElement = dynamicElement/> 
101					<#elseif attributeValue == "articleTitle"> 
102						<#assign articleTitle = dynamicElement.element("dynamic-content")/> 
103					<#elseif attributeValue == "shortDescription"> 
104							<#assign shortDescription = dynamicElement.element("dynamic-content")/> 
105					<#elseif attributeValue == "linkToPage"> 
106							<#assign linkToPage = dynamicElement.element("dynamic-content")/> 
107					<#elseif attributeValue == "readingTime"> 
108							<#assign readingTime = dynamicElement.element("dynamic-content")/> 
109					 <#elseif attributeValue == "altImage"> 
110							<#assign altImage = dynamicElement.element("dynamic-content")/> 
111					</#if> 
112					   
113				</#list> 
114				 
115				<#assign linkGroupId = groupId/> 
116                <#if linkToPage.getData()?contains("@")> 
117                	<#list linkToPage.getData()?split("@") as sValue> 
118                		<#if sValue?index == 0> 
119                			<#assign linkPageId = sValue?number/> 
120                		<#elseif sValue?index == 1> 
121                			<#if sValue == "private-group"> 
122                				<#assign linkPrivate = true/> 
123                			<#else> 
124                				<#assign linkPrivate = false/> 
125                			</#if> 
126                		<#elseif sValue?index == 2> 
127                			<#assign linkGroupId = sValue/> 
128                		</#if> 
129                	</#list> 
130                <#else> 
131            	    <#if linkToPage.getData()!=""> 
132                		<#assign pageLinkJson = linkToPage.getData()?eval> 
133                		<#if pageLinkJson.layoutId!=""> 
134                			<#assign linkPageId = pageLinkJson.layoutId> 
135                		</#if> 
136            			<#assign linkPrivate = pageLinkJson.privateLayout> 
137                	</#if> 
138                </#if> 
139                 
140                <#-- 
141                TEST 
142                ${linkGroupId}<br> 
143                ${linkPageId}<br> 
144                --> 
145                 
146				<#attempt> 
147    				<#assign quickURL = layoutLocalService.getLayout(getterUtil.getLong(linkGroupId), getterUtil.getBoolean(linkPrivate), getterUtil.getLong(linkPageId?number))/> 
148    				<#assign relativeURL = quickURL.getFriendlyURL()/> 
149    				<#if getterUtil.getBoolean(linkPrivate)> 
150    					<#assign hasAccess = layoutPermission.contains(permissionChecker, quickURL.getPlid(), 'VIEW')/> 
151    					<#if currentGroup.getName(locale) == "midlandnational.com" && hasAccess> 
152    						<#assign relativeURL = "/group/mnportal" + quickURL.getFriendlyURL()/> 
153    					<#elseif hasAccess> 
154    						<#assign relativeURL = "/group/nacolah-portal" + quickURL.getFriendlyURL()/> 
155    					</#if> 
156    				</#if>	 
157				<#recover> 
158				    <#assign relativeURL = "/learn-and-plan"/> 
159					<#assign Image = ""> 
160				</#attempt> 
161											 
162				<#assign imageJson = documentMedia.getData()> 
163				<#if imageJson?has_content> 
164					<#assign document_map = jsonFactoryUtil.createJSONObject(imageJson)> 
165					<#assign title = document_map.getString("title")> 
166					<#assign uuid = document_map.getString("uuid")> 
167					<#assign groupId = document_map.getString("groupId")> 
168					<#assign dlFile = dlAppLocalServiceUtil.getFileEntryByUuidAndGroupId(uuid,groupId?number)> 
169					<#assign Image = dlUtil.getPreviewURL(dlFile, dlFile.getFileVersion(),themeDisplay,'')> 
170				 </#if> 
171				 
172				        <div class="card" onclick="location.href='${relativeURL}';"> 
173				             
174				            <div class="card-header"> 
175				                <div class="aspect-ratio aspect-ratio-8-to-3"> 
176				                    <#if altImage != ""> 
177            							<img class="img-cover" alt="${altImage.getText()}" src="${Image}"/> 
178            						<#else> 
179            							<img class="img-cover" src="${Image}"/> 
180            						</#if> 
181            						<!-- 
182            						<#if altImage != ""> 
183            							<img class="img-fluid" alt="${altImage.getText()}" src="${Image}"/> 
184            						<#else> 
185            							<img class="img-fluid" src="${Image}"/> 
186            						</#if> 
187            						--> 
188				                </div> 
189				            </div> 
190				             
191				            <div class="card-content"> 
192				                 
193				                <!--<div class="card-body widget-topbar">--> 
194				                    <div class="autofit-row card-title"> 
195    				                    <div class="autofit-col autofit-col-expand"> 
196    				                        <h3 class="title"> 
197    				                            <a class="btn btn-link btn-lg text-left p-0 font-weight-bold" href="${relativeURL}" style="font-size:20px;">${articleTitle.getText()}</a> 
198    				                        </h3> 
199    				                    </div> 
200				                    </div> 
201				                <!--</div>--> 
202				                 
203    				            <div class="autofit-row widget-metadata"> 
204    				                <div class="short-description">${shortDescription.getText()}</div> 
205    				            </div> 
206				            </div> 
207				             
208				            <div class="cta-row"> 
209			                    <a class="blog btn btn-primary mr-3" href="#">Read More</a> 
210                                <p class="reading-time">Reading Time : ${readingTime.getText()}</p> 
211			                </div> 
212			 
213				        </div> 
214 
215			 
216				 
217			</#list> 
218		</#if> 
219 
220	</div> 
221</div> 
222 
223<p style="clear:left;"></p> 
224 
225<style> 
226 
227    .img-cover { 
228        object-fit: cover; 
229        width: 300px; 
230        height: 165px; 
231
232 
233 
234 
235    .card-article-list { 
236        /*width: 1280px; /*four cards wide*/ 
237        /*width: 960px; /*three cards wide*/ 
238        width: 320px; /*one cards wide*/ 
239        display: block; 
240        margin-left: auto; 
241        margin-right: auto; 
242
243     
244    @media screen and (min-width: 700px) { 
245      .card-article-list { 
246            /*width: 1280px; /*four cards wide*/ 
247            width: 660px; /*two cards wide*/ 
248            display: block; 
249            margin-left: auto; 
250            margin-right: auto; 
251
252
253     
254    @media screen and (min-width: 1020px) { 
255      .card-article-list { 
256            /*width: 1280px; /*four cards wide*/ 
257            width: 960px; /*three cards wide*/ 
258            display: block; 
259            margin-left: auto; 
260            margin-right: auto; 
261
262
263     
264    @media screen and (min-width: 1320px) { 
265      .card-article-list { 
266            width: 1280px; /*four cards wide*/ 
267            /*width: 960px; /*three cards wide*/ 
268            display: block; 
269            margin-left: auto; 
270            margin-right: auto; 
271
272
273 
274    .card {  
275        float: left; 
276        background-color: #F7F7F7; 
277        border: 1px #eeeeee solid; 
278        width: 300px; 
279        margin-right: 20px; 
280        height:458px; 
281
282    .card:hover { 
283        background-color: #d7d7d7; 
284        cursor: pointer; 
285
286    .card-header {  
287        height: 158px; 
288        padding: 0px;  
289        border-bottom: 3px solid #666666; 
290        background-color: #666666; 
291
292    h3.title a { 
293        font-size: 56px; 
294        color: white; 
295        margin: 10px 0px 10px 20px; 
296        font-weight: normal; 
297        border: none; 
298        line-height: 1.2; 
299
300    .aspect-ratio.aspect-ratio-8-to-3 { 
301        padding-bottom: 100%; 
302        width:100%; 
303
304    .aspect-ratio-item-center-middle { 
305        position: absolute; 
306        bottom: auto; 
307        left: auto; 
308        right: auto; 
309        top: auto; 
310        transform: translate(-35%, 0%); 
311
312    .aspect-ratio-item-fluid { 
313        max-width: 100%; 
314        position: absolute; 
315        word-wrap: break-word; 
316
317    .card-content { 
318        height:240px; 
319
320    .autofit-row, .sidebar-section-flex { 
321        display: block; 
322        flex-wrap: nowrap; 
323        width: 100%; 
324
325    .short-description { 
326        margin: -8px 18px 12px 18px; 
327        height: 136px; 
328        display: block; 
329        white-space: normal; 
330        overflow: hidden; 
331        text-overflow: ellipsis; 
332
333    .cta-row { 
334        padding: 4px 0px 0px 18px; 
335
336    a.blog.btn.btn-primary.mr-3 { 
337        float: left; 
338        font-size: .9em; 
339
340    a.blog.btn.btn-outline-primary.mr-3 { 
341        float: left; 
342        font-size: .9em; 
343
344    a.blog.btn.btn-outline-primary.mr-3:hover { 
345        background-color: #333333; 
346        color: white; 
347
348    p.reading-time { 
349        margin: 10px 0px 0px 0px; 
350        font-size: .85em; 
351
352    .card-footer{  
353        display: none; 
354
355     
356</style>