An error occurred while processing the template.
Java method "com.sun.proxy.$Proxy114.getCategory(long)" threw an exception when invoked on com.sun.proxy.$Proxy114 object "com.liferay.portlet.asset.service.impl.AssetCategoryLocalServiceImpl@14ec1c62"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign filteredCategory = AssetCateg...  [in template "20116#20152#65546" at line 11, column 5]
----
1<#assign AssetCategoryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService")> 
2<#assign AssetVocabularyLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyLocalService")> 
3 
4<#assign LayoutLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService")> 
5 
6<#assign blogVocabulary = AssetVocabularyLocalService.getGroupVocabulary(groupId, "Blog")> 
7 
8 
9<#if request.getParameter("p_r_p_categoryId")??> 
10    <#assign filteredCategoryId = request.getParameter("p_r_p_categoryId") > 
11    <#assign filteredCategory = AssetCategoryLocalService.getCategory(filteredCategoryId?number) > 
12    <#assign filteredCategoryName = filteredCategory.getName()?upper_case > 
13</#if> 
14 
15<#if request.getParameter("p_r_p_tag")??> 
16    <#assign filteredTag = request.getParameter("p_r_p_tag") > 
17 
18</#if> 
19 
20 
21<div id="main webcontent-list"> 
22    <div class="archive-box"> 
23        <#if filteredCategoryName??> 
24            <#if (locale == "es_ES") > 
25                <span>Categor&iacute;a</span> 
26            <#else> 
27                <span>Category</span> 
28            </#if> 
29            <h1>${filteredCategoryName}</h1> 
30        </#if> 
31        <#if filteredTag??> 
32            <#if (locale == "es_ES") > 
33                <span>Etiqueta de navegaci&oacute;n</span> 
34            <#else> 
35                <span>Browsing Tag</span> 
36            </#if> 
37            <h1>${filteredTag}</h1> 
38        </#if> 
39    </div> 
40 
41    <#if entries?has_content> 
42        <#list entries as curEntry> 
43 
44            <#-- Información del entry --> 
45            <#assign assetViewUrl = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, curEntry, true) > 
46            <#assign postDate = curEntry.getCreateDate() > 
47             
48            <#-- Extraemos los campos del web content recorriendo su estructura --> 
49            <#assign renderer = curEntry.getAssetRenderer() > 
50            <#assign journalArticle = renderer.getArticle() > 
51            <#assign postId = journalArticle.getPrimaryKey() > 
52            <#assign document = saxReaderUtil.read(journalArticle.getContent()) /> 
53            <#assign rootElement = document.getRootElement() /> 
54            <#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='separator']") > 
55            <#list xPathSelector.selectNodes(rootElement) as separatorNode> 
56                <#assign titleXPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='title']") > 
57                <#list titleXPathSelector.selectNodes(separatorNode) as title> 
58                    <#assign postTitle = title.getStringValue() /> 
59                </#list> 
60                <#assign imageXPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='image']") > 
61                <#list imageXPathSelector.selectNodes(separatorNode) as image> 
62                    <#if image.getData()?has_content > 
63                        <#assign postImage = image.getStringValue()?trim /> 
64                    </#if>     
65                </#list> 
66                <#assign titleXPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='content']") > 
67                <#list titleXPathSelector.selectNodes(separatorNode) as content> 
68                    <#assign postContent = content.getStringValue()?replace("<[^>]*>", "", "r") /> 
69                </#list> 
70            </#list> 
71 
72            <#-- Categorías --> 
73            <#assign categories = AssetCategoryLocalService.getAssetEntryAssetCategories(curEntry.getEntryId())> 
74 
75 
76            <article id="post-${postId}" class="list-item post-${postId} post type-post status-publish format-standard has-post-thumbnail hentry"> 
77 
78                <#if postImage?has_content > 
79                    <div class="post-img"> 
80                        <a href="${assetViewUrl}"><img width="520" height="400" src="${postImage}" class="attachment-misc-thumb size-misc-thumb wp-post-image"></a> 
81                    </div> 
82                </#if> 
83                 
84                <div class="list-content"> 
85             
86                    <div class="post-header"> 
87                        <span class="cat"> 
88                            <#if categories?has_content > 
89                                <#list categories as category > 
90                                    <#-- Categorías del vocabulario Blog --> 
91                                    <#if category.getVocabularyId() == blogVocabulary.getVocabularyId() > 
92                                        <#assign categoryName = category.getName()?upper_case /> 
93                                        <#assign categoryID = category.getCategoryId() /> 
94                                        <#assign categoryURL = '/cat/-/categories/' + categoryID /> 
95                                        <a href="${categoryURL}" rel="category tag">${categoryName}</a> 
96                                    </#if> 
97                                </#list> 
98                            </#if> 
99                        </span> 
100                        <h2> 
101                            <a href="${assetViewUrl}">${postTitle}</a> 
102                        </h2> 
103                        <span class="list-title-divider"></span> 
104                    </div> 
105                 
106                    <div class="post-entry"> 
107                        <#if (postContent?length > 240) > 
108                            <p>${postContent[0..240]}…</p> 
109                        <#else> 
110                            <p>${postContent}…</p> 
111                        </#if> 
112                    </div> 
113                 
114                    <div class="list-meta"> 
115                        <#if (locale == "es_ES") > 
116                            <span class="post-date">${postDate?string["dd/MM/yyyy"]}</span> 
117                        <#else> 
118                            <span class="post-date">${postDate?string["MM/dd/yyyy"]}</span> 
119                        </#if> 
120                    </div> 
121                </div> 
122            </article> 
123        </#list> 
124    </#if> 
125</div> 

FIND US ON FACEBOOK

INNOVATION VIDEOS

CONTACT SACYR

Paseo de la Castellana, 83-85.
28046 - Madrid (Spain)
Phone: +34 91 545 50 00

www.sacyr.com