Ocorreu um erro ao processar o template.
Java method "com.sun.proxy.$Proxy108.getEntry(String, long)" threw an exception when invoked on com.sun.proxy.$Proxy108 object "com.liferay.portlet.asset.service.impl.AssetEntryServiceImpl@7e12e124"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: asset = assetEntryService.getEntry(we...  [in template "20098#20124#91030" at line 266, column 45]
----
1<#assign  
2    ActividadeStructureId = "35650" 
3     
4    journalArticleId = .vars['reserved-article-id'].data 
5    JournalArticleService = serviceLocator.findService("com.liferay.journal.service.JournalArticleService") 
6    assetEntryQuery = objectUtil("com.liferay.asset.kernel.service.persistence.AssetEntryQuery") 
7     
8    assetEntryService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryService") 
9     
10    currentUrl = themeDisplay.getURLCurrent()  
11    baseUrl = themeDisplay.getURLPortal() + themeDisplay.getURLCurrent()?split('/-/')[0] 
12    assetCategoryService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryService") 
13    assetCategoryPropertyService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryPropertyLocalService") 
14     
15    dateFormatPT = "d MMMM, yyyy" 
16    dateFormatEN = "MMMM d, yyyy" 
17    displayDate = .vars['reserved-article-modified-date'].data  
18    displaydateFormated = displayDate?datetime("EEE, d MMM yyyy HH:mm:ss Z") 
19/> 
20 
21<#if locale == "PT_pt"> 
22    <#assign lastUpdateDate = dateUtil.getDate(displaydateFormated, dateFormatPT, locale)> 
23<#elseif locale == "EN_en"> 
24    <#assign lastUpdateDate = dateUtil.getDate(displaydateFormated, dateFormatEN, locale)> 
25<#else>   
26    <#assign lastUpdateDate = dateUtil.getDate(displaydateFormated, dateFormatPT, locale)> 
27</#if> 
28 
29 
30 
31<#if currentUrl?contains("categoryid")> 
32    <#assign  
33        categoryid = httpUtil.getParameter(currentUrl, "categoryid", false)   
34    /> 
35    <#attempt> 
36        <#assign  
37            category = assetCategoryService.getCategory(categoryid?number) 
38            categoryRoot = getRootCategory(category) 
39            areaId = assetCategoryPropertyService.getCategoryProperty(categoryRoot.getCategoryId()?number,"idarea").getValue() 
40            area = JournalArticleService.fetchArticle(groupId?number, areaId) 
41            areadocument = saxReaderUtil.read(area.getContent()) 
42            arearootElement = areadocument.getRootElement() 
43        /> 
44    <#recover> 
45    </#attempt> 
46</#if> 
47 
48 
49<#-- FUNCTION GET ROOT CATEGORY --> 
50<#function getRootCategory category> 
51    <#if !category.isRootCategory()> 
52        <#return getRootCategory(category.getParentCategory()) /> 
53    <#else> 
54        <#return category /> 
55    </#if> 
56</#function> 
57 
58 
59 
60 
61<#-- MACRO DISPLAY CATEGORIES LEVEL 1  --> 
62<#macro displayCategories1 parentcategory> 
63	 <#assign categories = assetCategoryService.getChildCategories(parentcategory)/> 
64	 <#list categories as category> 
65        <div class="panel"> 
66            <div  
67                class="panel-heading"  
68                id="heading${category.getCategoryId()}"> 
69                <a  
70                    class="btn submenu-item-1 heading-5 mb-0 w-100 font-weight-700"  
71                    data-toggle="collapse"  
72                    href="#subMenu${category.getCategoryId()}" tabindex=0> 
73                    ${category.getName()} 
74                </a> 
75            </div> 
76            <div  
77                class="panel-collapse collapse"  
78                id="subMenu${category.getCategoryId()}"> 
79                <div class="card card-body"> 
80                    <@displayCategories2 parentcategory=category.getCategoryId() /> 
81                    <@displayActivities parentcategory=category.getCategoryId() /> 
82                </div> 
83            </div> 
84        </div> 
85	</#list> 
86</#macro> 
87 
88<#-- MACRO DISPLAY CATEGORIES LEVEL 2  --> 
89<#macro displayCategories2 parentcategory> 
90    <#assign categories = assetCategoryService.getChildCategories(parentcategory)/> 
91	<#list categories as category> 
92        <div class="panel"> 
93            <div  
94                class="panel-heading"  
95                id="heading${category.getCategoryId()}"> 
96                <a class="btn submenu-item-2 submenu-item-2-1 body-2 mb-0"  
97                    data-toggle="collapse"  
98                    href="#accordionFormsIn${category.getCategoryId()}" tabindex=0> 
99                    ${category.getName()} 
100                </a>     
101            </div> 
102            <div  
103                class="panel-collapse collapse"  
104                id="accordionFormsIn${category.getCategoryId()}"> 
105                <div class="card card-body"> 
106                    <@displayCategories2 parentcategory=category.getCategoryId() /> 
107                    <@displayActivities parentcategory=category.getCategoryId() /> 
108                </div> 
109            </div> 
110        </div> 
111	</#list> 
112</#macro> 
113 
114 
115 
116<#-- MACRO DISPLAY ACTIVITIES --> 
117<#macro displayActivities parentcategory> 
118    <#assign  
119        VOID = assetEntryQuery.setAnyCategoryIds([parentcategory]) 
120        VOID = assetEntryQuery.setClassTypeIds([ActividadeStructureId?number]) 
121        VOID = assetEntryQuery.setOrderByCol1("title") 
122        VOID = assetEntryQuery.setOrderByType1("asc") 
123        assetentries = assetEntryService.getEntries(assetEntryQuery)> 
124	<#list assetentries as curEntry> 
125	    <#assign  
126	        curEntryRenderer = curEntry.getAssetRenderer()  
127	        className = curEntryRenderer.getClassName() /> 
128	     
129	    <#if className == "com.liferay.journal.model.JournalArticle"> 
130            <#assign  
131                curarticle = curEntryRenderer.getArticle()  
132                categories = assetCategoryService.getCategories(curEntryRenderer.getClassName(), curarticle.getResourcePrimKey()) 
133                /> 
134            <#list categories as categoryarticle> 
135                <#if categoryarticle.getCategoryId() == parentcategory> 
136                    <!-- Adicionar class 'title-active' ao link que esteja activo --> 
137                    <#if categoryarticle.getCategoryId() == categoryRoot.getCategoryId() && curarticle.getArticleId() == journalArticleId> 
138                        <div class="panel"> 
139                        <a class="btn submenu-item-1 heading-5 mb-0 w-100 font-weight-700" tabindex=0>${curarticle.getTitle(locale)}</a> 
140                        </div> 
141                    <#else> 
142                        <#if categoryarticle.getCategoryId() == categoryRoot.getCategoryId()> 
143                            <#assign url = baseUrl + "/-/" + curarticle.getUrlTitle(locale) + "?categoryid=" +categoryarticle.getCategoryId() /> 
144                            <div class="panel"> 
145                            <a class="btn submenu-item-1 heading-5 mb-0 w-100 font-weight-700" href="${url}" tabindex=0>${curarticle.getTitle(locale)}</a> 
146                            </div> 
147                        <#else> 
148                            <#if curarticle.getArticleId() == journalArticleId && categoryarticle.getCategoryId() == categoryid?number> 
149                                <div class="panel"> 
150                                <p class="submenu-item-2 body-2 mb-0 title-active">${curarticle.getTitle(locale)}</p> 
151                                </div> 
152                            <#else> 
153                                <#assign url = baseUrl + "/-/" + curarticle.getUrlTitle(locale) + "?categoryid=" +categoryarticle.getCategoryId() /> 
154                                <div class="panel"> 
155                                    <p class="submenu-item-2 body-2 mb-0"><a href="${url}" tabindex=0>${curarticle.getTitle(locale)}</a></p> 
156                                </div> 
157                            </#if> 
158                        </#if> 
159                    </#if> 
160                </#if> 
161            </#list> 
162        </#if> 
163	</#list> 
164</#macro> 
165 
166<#--- BREADCRUMB --> 
167<div class="breadcrumbs-area"> 
168    <div class="container-fixed"> 
169        <nav aria-label="breadcrumb"> 
170            <ol class="breadcrumb"> 
171                <li class="breadcrumb-item"><a href="${themeDisplay.getPortalURL()}"><span>${languageUtil.get(locale, "translate_Home")}</span></a></li> 
172                <#if area??> 
173                    <#--- 
174                    <#list arearootElement.elements() as dynamicElement> 
175                        <#if "Title" == dynamicElement.attributeValue("name")> 
176                            <#assign titlearea = dynamicElement.element("dynamic-content").getText()/> 
177                            <#break />   
178                        </#if> 
179                    </#list> 
180                    --> 
181                    <li class="breadcrumb-item"><a href="${baseUrl}/-/${area.urlTitle}" tabindex=0><span>${area.getTitle()}</span></a></li> 
182                </#if> 
183                <li class="breadcrumb-item active" aria-current="page"><span>${.vars['reserved-article-title'].data}</span></li> 
184            </ol> 
185        </nav> 
186    </div> 
187</div> 
188 
189 
190 
191 
192 
193 
194 
195<#--- LEFT MENU ---> 
196<div class="container-fixed page-atividade"> 
197    <div class="row"> 
198        <div class="col-12 col-md-4 col-lg-3 submenu"> 
199            <#if categoryRoot??> 
200                <div class="panel-group" id="accordionmenuareas" > 
201                    <@displayCategories1 parentcategory=categoryRoot.getCategoryId() /> 
202                    <@displayActivities parentcategory=categoryRoot.getCategoryId() /> 
203                </div> 
204            </#if> 
205        </div> 
206        <div class="col-12 col-md-8 col-lg-9"> 
207            <h2 class="title-pages heading-1 mb-3">${Title.getData()}</h2> 
208            <h3 class="heading-2 mb-4"> 
209               <#if Internal.Subtitle?? && Internal.Subtitle.getData() !=""> 
210                 ${Internal.Subtitle.getData()} 
211                </#if> 
212            </h3> 
213            <p class="body-1 mb-4 text-atividade"> 
214                <#if Internal.Description?? && Internal.Description.getData()??  && Internal.Description.getData() !=""> 
215                    ${Internal.Description.getData()} 
216                </#if> 
217            </p> 
218 
219            <div class="row div-divider"> 
220                <div class="col-md-6 contactos-div"> 
221                    <#if MustRequire?? && MustRequire.getData() != ""> 
222                        <#if TextMustRequire?? && TextMustRequire.getData() != ""> 
223                            <p class="heading-5">${TextMustRequire.getData()}</p> 
224                        <#else> 
225                             <p class="heading-5">${languageUtil.get(locale, "translate_Must_require")}</p> 
226                        </#if> 
227                        <#if MustRequire.getSiblings()?has_content> 
228                            <#list MustRequire.getSiblings() as cur_MustRequire> 
229                               <#if cur_MustRequire.getData()?? && cur_MustRequire.getData() != ""> 
230                                    <#assign 
231                                    	webContentData = jsonFactoryUtil.createJSONObject(cur_MustRequire.getData()) 
232                                        asset = assetEntryService.getEntry( webContentData.className, webContentData.classPK?number) 
233                                        curarticle = asset.getAssetRenderer().getArticle()/> 
234                                    <#if curarticle.isApproved()> 
235                                        <p class="mb-0 body-1 requerer"> 
236                                            <#assign url = baseUrl + "/-/" + curarticle.getUrlTitle(locale) /> 
237                                            <a href="${url}" tabindex=0>> ${curarticle.getTitle(locale)}</a> 
238                                        </p> 
239                                    </#if> 
240                                </#if> 
241                            </#list> 
242                        </#if> 
243                    </#if> 
244                </div> 
245                <div class="col-md-6 contactos-div"> 
246                    <#if MayNeedConnect?? && MayNeedConnect.getData() != ""> 
247                        <#if TextMayNeedConnect?? && TextMayNeedConnect.getData() != ""> 
248                            <p class="heading-5">${TextMayNeedConnect.getData()}</p> 
249                        <#else> 
250                             <p class="heading-5">${languageUtil.get(locale, "translate_May_need")}</p> 
251                        </#if> 
252                        <p class="heading-5"><#if MayNeedConnect.getSiblings()?has_content> 
253	<#list MayNeedConnect.getSiblings() as cur_MayNeedConnect> 
254		<#assign 
255			webContentData = jsonFactoryUtil.createJSONObject(cur_MayNeedConnect.getData()) 
256		/> 
257	</#list> 
258</#if></p> 
259                        </#> 
260                        <p class="body-2 mb-0"> 
261                            <#if MayNeedConnect.getSiblings()?has_content> 
262                                <#list MayNeedConnect.getSiblings() as cur_MayNeedConnect> 
263                                   <#if MayNeedConnect.getData()?? && cur_MayNeedConnect.getData() != ""> 
264                                        <#assign 
265                                        	webContentData = jsonFactoryUtil.createJSONObject(cur_MayNeedConnect.getData()) 
266                                            asset = assetEntryService.getEntry( webContentData.className, webContentData.classPK?number) 
267                                            curarticle = asset.getAssetRenderer().getArticle() 
268                                           /> 
269                                         <#if curarticle.isApproved()> 
270                                            <p class="mb-0 body-1 requerer"> 
271                                                <#assign url = baseUrl + "/-/" + curarticle.getUrlTitle(locale) /> 
272                                                <a href="${url}" tabindex=0>> ${curarticle.getTitle(locale)}</a> 
273                                            </p> 
274                                        </#if> 
275                                    </#if> 
276                                </#list> 
277                            </#if> 
278                        </p> 
279                    </#if> 
280                     
281                </div> 
282            </div> 
283 
284             <div class="row div-imprimir"> 
285                <div class="d-flex align-items-center w-100 mb-2"> 
286                    <img src="${themeDisplay.getPathThemeImages()}/impressora.svg"> 
287                    <a onclick="Imprimir();" onkeypress="Imprimir();" href="javascript:void(0);" class="body-2 ml-2" tabindex=0>${languageUtil.get(locale, "translate_Print")}</a> 
288                </div> 
289                <p class="data-publicacao mb-3 font-weight-300">${languageUtil.get(locale, "translate_Last_update")}: ${lastUpdateDate}.</p> 
290            </div> 
291 
292        </div> 
293    </div> 
294     
295</div> 

Partilhar

facebook whatsapp email