Se ha producido un error al procesar la plantilla.
Java method "com.sun.proxy.$Proxy67.getAssetCategory(long)" threw an exception when invoked on com.sun.proxy.$Proxy67 object "com.liferay.asset.categories.internal.service.AssetEntryAssetCategoryRelAssetCategoryLocalServiceWrapper@188b3b79"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: category = assetCategoryService.getAs...  [in template "217051#217099#698043" at line 48, column 22]
	- Reached through: #assign-container  [in template "217051#217099#698043" at line 48, column 13]
----
1<#assign assetCategoryService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") 
2		 assetCategoryPropertyService =  serviceLocator.findService("com.liferay.asset.category.property.service.AssetCategoryPropertyLocalService") 
3		 SAXReaderUtil = staticUtil["com.liferay.portal.kernel.xml.SAXReaderUtil"] 
4		 HtmlUtil = staticUtil["com.liferay.portal.kernel.util.HtmlUtil"] 
5		 layoutLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService") 
6		 PortletURLFactoryUtil = staticUtil["com.liferay.portal.kernel.portlet.PortletURLFactoryUtil"] 
7		 PortletRequest = staticUtil["javax.portlet.PortletRequest"]     
8		 journalArticleService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")   
9		 ParamUtil = staticUtil["com.liferay.portal.kernel.util.ParamUtil"]             
10         categoryId =ParamUtil.getLong(renderRequest,"categoryId", 0) 
11         maxLoop = 100 
12/> 
13 
14<#if (categoryId <= 0) > 
15     
16    <#if entries?has_content>s 
17		<#if entries?first?? && entries?first.getCategories()??> 
18			<#foreach aCategory in entries?first.getCategories()> 
19				<#assign aCategory = aCategory/> 
20				<#break> 
21			</#foreach> 
22		</#if> 
23	<#if aCategory?has_content> 
24			<#list 1..maxLoop as i> 
25				<#list 1..maxLoop as j> 
26					<#if aCategory.getParentCategory()?has_content> 
27						<#assign aCategory = aCategory.getParentCategory()/> 
28					<#else> 
29						<#assign categoryId = aCategory.getCategoryId()/> 
30				   </#if>   
31				   <#break> 
32				</#list> 
33				<#if (categoryId > 0) > 
34					<#break> 
35				</#if> 
36			</#list> 
37		 </#if> 
38	 </#if> 
39</#if> 
40 
41<nav aria-label="breadcrumb"> 
42    <ol class="breadcrumb"> 
43        <li class="breadcrumb-title"><span>${languageUtil.get(locale,"transparencia.breadcrumb-title")}</span></li> 
44        <li class="breadcrumb-item"><a href="http://www.asturias.es">${languageUtil.get(locale,"transparencia.breadcrumb-asturias")}</a></li> 
45         
46        <#if (categoryId > 0) > 
47 
48            <#assign category = assetCategoryService.getAssetCategory(categoryId) 
49            		 breadCrumbContent = "" 
50            		 categoryAncestors = category.getAncestors()/> 
51                      
52            <#if categoryAncestors?has_content> 
53                <#foreach categoryAncestor in categoryAncestors> 
54                 
55                    <#assign detailPage = "general" 
56							         layoutDetail = layoutLocalService.getFriendlyURLLayout(themeDisplay.getScopeGroupId(), false, "/"+detailPage) /> 
57							            	 		  
58				    		<#-- obtener el contenido de la categoría hija --> 
59		                    <#if assetCategoryPropertyService.getCategoryProperty(categoryAncestor.getCategoryId(),"idContenido") ? has_content > 
60		                    	<#assign contentIdProperty = assetCategoryPropertyService.getCategoryProperty(categoryAncestor.getCategoryId(),"idContenido") 
61		                        		 contentId = contentIdProperty.getValue()/> 
62		                       <#if contentId ? has_content> 
63		                       		<#assign journalArticleSub = journalArticleService.getLatestArticle(groupId,contentId)/> 
64		                                         
65		                            <#if journalArticleSub?has_content> 
66		                                   <#-- obtener el contenido de la categoría actual --> 
67		                                              
68		                                   <#assign document = SAXReaderUtil.read(journalArticleSub.getContentByLocale(locale)) 
69		                                                     paginaDetalleNode =  document.selectSingleNode("/root/dynamic-element[@name='paginaDetalle']/dynamic-content") 
70		                                            /> 
71		                                   <#if paginaDetalleNode?has_content && paginaDetalleNode.getText()?has_content> 
72							        			<#assign  pageDetail = paginaDetalleNode.getText()/> 
73							        			<#if (pageDetail?index_of("@")>0)> 
74							                		<#assign pageDetailPosition = (pageDetail?index_of("@")-1) 
75					                         					 pageDetail = pageDetail[0..pageDetailPosition] 
76					                          					 layoutDetail = layoutLocalService.getLayout(themeDisplay.getScopeGroupId(),false,pageDetail?number) 
77							                      	/> 
78							                      	 
79							                     </#if> 
80											</#if> 
81							                                     
82		                              </#if> 
83		                        </#if> 
84		                    </#if> 
85				    		<#assign categoryUrl = PortletURLFactoryUtil.create(request, "com_liferay_asset_categories_navigation_web_portlet_AssetCategoriesNavigationPortlet", layoutDetail.getPlid(), PortletRequest.RENDER_PHASE)/> 
86				    		${categoryUrl.setParameter("categoryId",categoryAncestor.getCategoryId()+"")} 
87                	 
88                	<#if categoryAncestor.isRootCategory()> 
89                		<#assign breadCrumbContent = "<li class='breadcrumb-item'><a href='"+categoryUrl+"'>"+languageUtil.get(locale,"transparencia.breadcrumb-portal")+" </a> </li>"+breadCrumbContent/> 
90                	<#else> 
91                    	<#assign breadCrumbContent = "<li class='breadcrumb-item'><a href='"+categoryUrl+"'>"+categoryAncestor.getName()+" </a> </li>"+breadCrumbContent/> 
92                    </#if> 
93                 
94                </#foreach> 
95                 
96                ${breadCrumbContent} 
97                 
98            </#if> 
99            <li class="breadcrumb-item active">${category.getTitle(locale)}</li> 
100        </#if> 
101    </ol> 
102</nav> 
103 
104<script type="text/javascript"> 
105	$( document ).ready(function() { 
106		 if(typeof ga !== "undefined") { 
107		 <#if category ? has_content> 
108		 	var pageName = '${category.getName()}'; 
109		 <#else> 
110		 	var pageName = location.pathname; 
111		 </#if> 
112			     ga( 'send', 'pageview', { 
113				    'page': pageName, 
114				    'title': pageName 
115				} ); 
116
117	}); 
118</script> 
Se ha producido un error al procesar la plantilla.
Java method "com.sun.proxy.$Proxy67.getAssetCategory(long)" threw an exception when invoked on com.sun.proxy.$Proxy67 object "com.liferay.asset.categories.internal.service.AssetEntryAssetCategoryRelAssetCategoryLocalServiceWrapper@188b3b79"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign currentCategory = assetCatego...  [in template "217051#217099#698025" at line 44, column 10]
----
1<#assign assetCategoriesCustomService = serviceLocator.findService("pa.mtl.assetcategories.service.api.AssetCategoriesServiceApi") 
2		 assetCategoryService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") 
3		 assetCategoryPropertyService =  serviceLocator.findService("com.liferay.asset.category.property.service.AssetCategoryPropertyLocalService") 
4		 SAXReaderUtil = staticUtil["com.liferay.portal.kernel.xml.SAXReaderUtil"] 
5		 HtmlUtil = staticUtil["com.liferay.portal.kernel.util.HtmlUtil"] 
6		 layoutLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService") 
7		 PortletURLFactoryUtil = staticUtil["com.liferay.portal.kernel.portlet.PortletURLFactoryUtil"] 
8		 PortletRequest = staticUtil["javax.portlet.PortletRequest"]     
9		 journalArticleService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") 
10		 ParamUtil = staticUtil["com.liferay.portal.kernel.util.ParamUtil"]   
11		 categoryId =ParamUtil.getLong(renderRequest,"categoryId", 0) 
12		 categoryName = ParamUtil.getString(request,"categoryName", "") 
13		 maxLoop = 100 
14/> 
15 
16<#-- inicialización de categoría: si no hay seleccionada se coge la primera de la jerarquía --> 
17<#if (categoryId <= 0) > 
18 
19    <#if categoryName?has_content> 
20    	<#assign currentCategory = assetCategoriesCustomService.findCategoryByName(categoryName, groupId) 
21    			 categoryId = currentCategory.getCategoryId()/> 
22    <#else> 
23     
24	    <#if entries?has_content> 
25	        <#foreach vocabulary in entries> 
26	         
27	            <#foreach aCategory in vocabulary.getCategories()> 
28	                <#list 1..maxLoop as i> 
29	                    <#if aCategory.getParentCategory()?has_content> 
30	                        <#assign aCategory = aCategory.getParentCategory()/> 
31	                    <#else> 
32	                        <#assign categoryId = aCategory.getCategoryId()/> 
33	                        <#break>  
34	                   </#if>   
35	                </#list> 
36	            </#foreach> 
37	             
38	        </#foreach> 
39	    </#if> 
40	</#if>     
41</#if> 
42 
43<#if ! currentCategory ? has_content > 
44	 <#assign currentCategory = assetCategoryService.getAssetCategory(categoryId)/> 
45</#if> 
46 
47<#assign childCategories = assetCategoriesCustomService.getChildCategoriesOrdered(categoryId,locale) 
48         showContents = true 
49         forceShowCategories = false 
50/> 
51 
52<#assign structureArticulo = assetCategoriesCustomService.getJournalStructureByKey(groupId, "STR_ARTICULO")/> 
53<#-- Pintar subcategorías --> 
54<#if childCategories?has_content>	 
55	<div class="contenedor-interior">                
56        <div class="row col-md-12" >             
57        	<#if assetCategoryPropertyService.getCategoryProperty(currentCategory.getCategoryId(),"idContenido") ? has_content > 
58                <#assign contentIdProperty = assetCategoryPropertyService.getCategoryProperty(currentCategory.getCategoryId(),"idContenido")/> 
59                <#assign contentId = contentIdProperty.getValue()/> 
60                <#if contentId ? has_content> 
61                    <#assign journalArticleSub = journalArticleService.getLatestArticle(groupId,contentId)/>       
62                    <#assign childCategoryContent = journalArticleService.getArticleContent(journalArticleSub, "TPL_CATEGORIA_TITULO","VIEW", locale, themeDisplay)/> 
63                    ${childCategoryContent}     
64	             </#if>	 
65			</#if>	 
66        </div>             
67		<div class="row col-md-12" >    	 
68			<#list childCategories as childCategory>	 
69	      		<#if assetCategoryPropertyService.getCategoryProperty(childCategory.getCategoryId(),"idContenido") ? has_content > 
70	                <#assign contentIdProperty = assetCategoryPropertyService.getCategoryProperty(childCategory.getCategoryId(),"idContenido")/> 
71	                <#assign contentId = contentIdProperty.getValue()/> 
72	                <#if contentId ? has_content> 
73	                    <#assign journalArticleSub = journalArticleService.getLatestArticle(groupId,contentId)/> 
74	                     
75	                    <#assign document = SAXReaderUtil.read(journalArticleSub.getContentByLocale(locale)) 
76							paginaDetalleNode =  document.selectSingleNode("/root/dynamic-element[@name='paginaDetalle']/dynamic-content") 
77						/> 
78	 
79						<#if paginaDetalleNode?has_content && paginaDetalleNode.getText()?has_content> 
80							<#assign  pageDetail = paginaDetalleNode.getText()/> 
81							<#if (pageDetail?index_of("@")>0)> 
82								<#assign pageDetailPosition = (pageDetail?index_of("@")-1) 
83	 								pageDetail = pageDetail[0..pageDetailPosition] 
84	 								layoutDetail = layoutLocalService.getLayout(themeDisplay.getScopeGroupId(),false,pageDetail?number)					                          					  
85								/> 
86							</#if> 
87						<#else> 
88	                        <#assign detailPage = "general" 
89	                                 layoutDetail = layoutLocalService.getFriendlyURLLayout(themeDisplay.getScopeGroupId(), false, "/"+detailPage) /> 
90						</#if> 
91							 
92						<#assign categoryUrl = PortletURLFactoryUtil.create(request, "com_liferay_asset_categories_navigation_web_portlet_AssetCategoriesNavigationPortlet", layoutDetail.getPlid(), PortletRequest.RENDER_PHASE)/> 
93							${categoryUrl.setParameter("categoryId", childCategory.getCategoryId()+"")}	 
94																		 
95	                    <#if journalArticleSub?has_content> 
96	                        <#-- obtener el contenido de la categoría actual --> 
97							<#assign structureEnlace = assetCategoriesCustomService.getJournalStructureByKey(groupId, "STR_ENLACE")/>  
98      						<#assign structures = [structureArticulo.getStructureId(),structureEnlace.getStructureId()] /> 
99	                        <#assign childCategoryContent = journalArticleService.getArticleContent(journalArticleSub, "TPL_CATEGORIA","VIEW", locale, themeDisplay)/> 
100							<#assign journalArticles = assetCategoriesCustomService.findJournalArticlesElasticSearchByCategoryId(childCategory.getCategoryId(), groupId, portalUtil.getCompanyId(request), structures, locale,"fecha", "desc")/>  
101	                        <div class="col-md-6 articulo-relacionado"> 
102	                       		${childCategoryContent}   
103								<#if (journalArticles?size>1)> 
104									<div class="link-more"> 
105										<a class="more-information" title="${languageUtil.get(locale,'transparencia.general.more-info-about')} ${childCategory.getTitle(locale)}" 
106											href="${categoryUrl}" >${languageUtil.get(locale,'transparencia.general.more-info')}</a> 
107									</div> 
108								<#else> 
109									<#assign countChildCategories = assetCategoryService.getChildCategoriesCount(childCategory.getCategoryId()) /> 
110									<#if (countChildCategories > 0)> 
111										<div class="link-more"> 
112											<a class="more-information" title="${languageUtil.get(locale,'transparencia.general.more-info-about')} ${childCategory.getTitle(locale)}" 
113												href="${categoryUrl}" >${languageUtil.get(locale,'transparencia.general.more-info')}</a> 
114										</div> 
115									<#else> 
116										<#if (journalArticles?size = 0)> 
117											<div class="link-more"> 
118												<a class="more-information" title="${languageUtil.get(locale,'transparencia.general.more-info-about')} ${childCategory.getTitle(locale)}" 
119													href="${categoryUrl}" >${languageUtil.get(locale,'transparencia.general.more-info')}</a> 
120											</div> 
121										<#else> 
122											<#assign isListJournalsOrNotLink = false/> 
123											<#if (journalArticles?size = 1)> 
124												<#assign  
125													journalArticle = journalArticles[0] 
126													ddmStructureKey = journalArticle.getDDMStructureKey() 
127												/> 
128											</#if> 
129											<#if (ddmStructureKey = "STR_ENLACE")> 
130												<#assign isListJournalsOrNotLink = true/> 
131											</#if> 
132											<#if isListJournalsOrNotLink> 
133												<div class="link-more"> 
134													<a class="more-information" title="${languageUtil.get(locale,'transparencia.general.more-info-about')} ${childCategory.getTitle(locale)}" 
135														href="${categoryUrl}" >${languageUtil.get(locale,'transparencia.general.more-info')}</a> 
136												</div> 
137											<#else> 
138												<#list journalArticles as journalArticle> 
139													<#assign  
140														document = SAXReaderUtil.read(journalArticle.getContentByLocale(locale))			                      
141														title = "" 
142														articleTitle = "" 
143														currentUrl = renderResponse.createRenderURL() 
144														detailPage = "detalle" 
145														layoutDetail = layoutLocalService.getFriendlyURLLayout(themeDisplay.getScopeGroupId(), false, "/"+detailPage) 
146														detailUrl = PortletURLFactoryUtil.create(request, "com_liferay_asset_categories_navigation_web_portlet_AssetCategoriesNavigationPortlet", layoutDetail.getPlid(), PortletRequest.RENDER_PHASE) 
147													/> 
148													 
149													${detailUrl.setParameter("articleId", journalArticle.getArticleId())} 
150													${currentUrl.setParameter("categoryId",categoryId+"")} 
151													<#if document.selectSingleNode("/root/dynamic-element[@name='titulo']/dynamic-content") ? has_content> 
152														<#assign  
153															titleNode = document.selectSingleNode("/root/dynamic-element[@name='titulo']/dynamic-content")	 
154															title = titleNode.getText() 
155															articleTitle = titleNode.getText() 
156														/> 
157													</#if> 											 
158													<#if (countChildCategories <= 0 && journalArticles?size = 1)> 
159														${detailUrl.setParameter("categoryId",childCategory.getCategoryId()+"")} 
160														<#assign title = childCategory.getTitle(locale)/> 
161													<#else> 
162														${detailUrl.setParameter("categoryId",currentCategory.getCategoryId()+"")}														 
163													</#if> 
164													<div class="link-more"> 
165														<a class="more-information" title="${languageUtil.get(locale,'transparencia.general.more-info-about')} ${title}" href="${detailUrl}&articleId=${journalArticle.getArticleId()}&title=${HtmlUtil.escapeURL(articleTitle)}&redirect=${HtmlUtil.escapeURL(currentUrl)}">${languageUtil.get(locale,'transparencia.general.more-info')}</a> 
166													</div> 
167												</#list> 
168											</#if> 
169										</#if> 
170									</#if> 
171								</#if> 
172	                       	</div> 
173	                    </#if> 
174	                </#if> 
175	            </#if> 
176	       </#list>    
177	   </div> 
178    </div>  
179<!-- No hay subcategorías, pintamos los contenidos de la categoría --> 
180<#else>                           
181  	<div class="contenedor-interior"> 
182        <div class="row col-md-12" >             
183        	<#if assetCategoryPropertyService.getCategoryProperty(currentCategory.getCategoryId(),"idContenido") ? has_content > 
184                <#assign contentIdProperty = assetCategoryPropertyService.getCategoryProperty(currentCategory.getCategoryId(),"idContenido")/> 
185                <#assign contentId = contentIdProperty.getValue()/> 
186                <#if contentId ? has_content> 
187                    <#assign journalArticleSub = journalArticleService.getLatestArticle(groupId,contentId)/>       
188                    <#assign childCategoryContent = journalArticleService.getArticleContent(journalArticleSub, "TPL_CATEGORIA_TITULO","VIEW", locale, themeDisplay)/> 
189                    ${childCategoryContent}     
190	             </#if>	 
191			</#if>	 
192        </div>                   
193      	 
194      	<div class="row col-md-12"> 
195			<#assign structureEnlace = assetCategoriesCustomService.getJournalStructureByKey(groupId, "STR_ENLACE")/>  
196      		<#assign structures = [structureArticulo.getStructureId(),structureEnlace.getStructureId()] /> 
197			<#assign journalArticles = assetCategoriesCustomService.findJournalArticlesElasticSearchByCategoryId(currentCategory.getCategoryId(), groupId, portalUtil.getCompanyId(request), structures, locale,"fecha", "desc")/>             	 
198				             
199            <#list journalArticles as journalArticle> 
200            	<#assign document = SAXReaderUtil.read(journalArticle.getContentByLocale(locale))			                      
201	                     title = "" 
202	                     resumen = ""	 
203	                     currentUrl = renderResponse.createRenderURL() 
204	                     detailPage = "detalle" 
205                     	 layoutDetail = layoutLocalService.getFriendlyURLLayout(themeDisplay.getScopeGroupId(), false, "/"+detailPage) 
206             			 detailUrl = PortletURLFactoryUtil.create(request, "com_liferay_asset_categories_navigation_web_portlet_AssetCategoriesNavigationPortlet", layoutDetail.getPlid(), PortletRequest.RENDER_PHASE) 
207     			/> 
208	            <#if document.selectSingleNode("/root/dynamic-element[@name='titulo']/dynamic-content")?has_content> 
209					<#assign titleNode = document.selectSingleNode("/root/dynamic-element[@name='titulo']/dynamic-content")	 
210							 title = titleNode.getText() 
211					/> 
212		      	</#if>  
213	            <#if document.selectSingleNode("/root/dynamic-element[@name='resumen']/dynamic-content")?has_content> 
214					<#assign resumenNode = document.selectSingleNode("/root/dynamic-element[@name='resumen']/dynamic-content")	 
215							 resumen = HtmlUtil.stripHtml(resumenNode.getText()) 
216					/> 
217		      	</#if> 
218		      	<#if document.selectSingleNode("/root/dynamic-element[@name='imagen']/dynamic-content")?has_content> 
219					<#assign image=document.valueOf( "//dynamic-element[@name='imagen']/dynamic-content/text()") />  
220					<#if image?has_content> 
221    					<#assign imageJson = image?eval />  
222					</#if> 
223		      	</#if> 
224				 
225				<#-- Si la estructura no coincide, es un ENLACE y cargamos otros campos --> 
226				<#if structureArticulo.getStructureKey() != journalArticle.getStructureId() > 
227					<#if document.selectSingleNode("/root/dynamic-element[@name='urlEnlace']/dynamic-content")?has_content> 
228						<#assign urlEnlaceNode = document.selectSingleNode("/root/dynamic-element[@name='urlEnlace']/dynamic-content")	 
229							urlEnlace = urlEnlaceNode.getText() 
230						/> 
231					</#if> 
232					<#if document.selectSingleNode("/root/dynamic-element[@name='descripcion']/dynamic-content")?has_content> 
233						<#assign descripcionNode = document.selectSingleNode("/root/dynamic-element[@name='descripcion']/dynamic-content")	 
234							descripcion = descripcionNode.getText() 
235						/> 
236					</#if>				     	             	 
237				</#if> 
238 
239				${currentUrl.setParameter("categoryId",categoryId+"")} 
240				${detailUrl.setParameter("categoryId",currentCategory.getCategoryId()+"")} 
241				${detailUrl.setParameter("articleId", journalArticle.getArticleId())}						 
242					               
243      			<div class="col-md-6 articulo-relacionado">  
244              		<#if imageJson?has_content> 
245              			<div class="titulo-tema row col-md-12">		                          			 
246                        	<h4 class="title"> 
247	                      		${title} 
248	                      	</h4>  
249                    	</div> 
250						<#assign imageJson = "" /> 		                            	 
251                    <#else> 
252                    	<div class="titulo-tema without-image row col-md-12"> 
253                    		<h4 class="title"> 
254	                      		${title} 
255	                      	</h4>  
256	                    </div> 
257                    </#if> 
258 
259					<#if structureArticulo.getStructureKey() == journalArticle.getStructureId() > 
260						<div class="summary">                                 
261							${resumen} 
262						</div>	 
263						<div class="link-more"> 
264							<a class="more-information" title="${languageUtil.get(locale,'transparencia.general.more-info-about')} ${title}" 
265								href="${detailUrl}&articleId=${journalArticle.getArticleId()}&title=${HtmlUtil.escapeURL(title)}&redirect=${HtmlUtil.escapeURL(currentUrl)}">${languageUtil.get(locale,'transparencia.general.more-info')}</a> 
266						</div> 
267					<#else>	 
268						<div class="summary">                                 
269							${descripcion} 
270						</div> 
271						<div class="link-more"> 
272							<a class="more-information" title="${languageUtil.get(locale,'transparencia.general.more-info-about')} ${title}" 
273									href="${urlEnlace}" target="_blank">${languageUtil.get(locale,'transparencia.general.more-info')}</a> 
274						</div> 
275					</#if> 
276 
277              	</div>  
278        	</#list>  
279        </div>    
280    </div>    	 
281</#if>