Documentos

Se ha producido un error al procesar la plantilla.
Java method "com.liferay.portal.kernel.util.DateUtil_IW.parseDate(String, String, Locale)" threw an exception when invoked on com.liferay.portal.kernel.util.DateUtil_IW object "com.liferay.portal.kernel.util.DateUtil_IW@7b5a5879"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign fecha_DateObj = dateUtil.pars...  [in template "21222#21260#105931" at line 69, column 25]
----
1<#macro length f> 
2	<#assign numMegas = (f.getSize()?number/1048576)> 
3	<#assign numKas = (f.getSize()?number/1024)> 
4	<#setting number_format="0.##"> 
5    <#if (numMegas>=1)>         
6		${numMegas} MB 
7    <#else>         
8		${numKas} KB 
9    </#if> 
10</#macro> 
11<#macro tipoFichero fileMimeT> 
12	 
13	<#if fileMimeT?contains("pdf")>         
14		<span class="pdf">pdf</span> 
15    <#elseif fileMimeT?contains("doc")>         
16		<span class="doc">doc</span> 
17    <#elseif fileMimeT?contains("msword")>         
18		<span class="doc">doc</span> 
19    <#elseif fileMimeT?contains("vnd.openxmlformats-officedocument.wordprocessingml.document")>         
20		<span class="doc">doc</span> 
21    <#elseif fileMimeT?contains("vnd.oasis.opendocument.text")>         
22		<span class="doc">odt</span> 
23    <#elseif fileMimeT?contains("xls")>         
24		<span class="xls">xls</span> 
25    <#elseif fileMimeT?contains("zip") || fileMimeT?contains("x-zip-compressed")>         
26		<span class="zip">zip</span> 
27    <#elseif fileMimeT?contains("ppt") || fileMimeT?contains("vnd.ms-powerpoint")>         
28		<span class="ppt">ppt</span> 
29    <#elseif fileMimeT?contains("vnd.openxmlformats-officedocument.presentationml.presentation")>         
30		<span class="ppt">pptx</span> 
31    <#else>         
32		<span>${fileMimeT}</span> 
33    </#if> 
34</#macro> 
35 
36<#assign fileLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService")> 
37<#assign dLFileEntryService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryService")> 
38<#if entries?size &gt; 0 >	 
39	<#-- Formato del idioma--> 
40	<#assign formato_idioma = "yyyy·MM·dd">	 
41	<#if locale == "es_ES"> 
42		<#assign formato_idioma = "dd·MM·yyyy">	 
43	<#elseif locale == "eu_ES"> 
44		<#assign formato_idioma = "yyyy·MM·dd">	 
45	<#elseif locale == "en_EN"> 
46		<#assign formato_idioma = "yyyy·MM·dd">	 
47	<#elseif locale == "fr_FR"> 
48		<#assign formato_idioma = "dd·MM·yyyy">	 
49	<#elseif locale == "de_DE"> 
50		<#assign formato_idioma = "dd·MM·yyyy">	 
51	<#elseif locale == "ca_ES"> 
52		<#assign formato_idioma = "dd·MM·yyyy">	 
53	<#elseif locale == "gl_ES"> 
54		<#assign formato_idioma = "dd·MM·yyyy">	 
55	<#else> 
56		<#assign formato_idioma = "yyyy·MM·dd">	 
57	</#if>	 
58	<#assign primero = "primero"> 
59	<div class="documentos"> 
60	<#foreach entry in entries> 
61		<#assign renderer = entry.getAssetRenderer()> 
62		<#assign className = renderer.getClassName()>         
63		<#if className == "com.liferay.journal.model.JournalArticle"> 
64			<#assign journalArticle = renderer.getArticle()>             
65			<#assign document = saxReaderUtil.read(journalArticle.getContentByLocale(locale.toString()))> 
66			<#assign rootElement = document.getRootElement()> 
67			<#assign izena = entry.getTitle(locale)> 
68		    <#assign data = document.valueOf("//dynamic-element[@name='Data']/dynamic-content/text()") /> 
69			<#assign fecha_DateObj = dateUtil.parseDate("yyyy-MM-dd", data, locale)> 
70			<#assign data = dateUtil.getDate(fecha_DateObj, formato_idioma, locale)> 
71			<#assign deskribapena = saxReaderUtil.createXPath("dynamic-element[@name='Deskribapena']").selectSingleNode(rootElement).getStringValue()> 
72		    <#assign fitxategia = document.valueOf("//dynamic-element[@name='Fitxategia']/dynamic-content/text()") /> 
73	 
74			<#if fitxategia!=""> 
75                <#assign fitxategia_map = fitxategia?eval /> 
76				<#if fitxategia_map.groupId?? && fitxategia_map.groupId?has_content && fitxategia_map.uuid?? && fitxategia_map.uuid?has_content>  
77					<#assign fileMi = dLFileEntryService.getFileEntryByUuidAndGroupId(fitxategia_map.uuid?string, getterUtil.getLong(fitxategia_map.groupId))> 
78					 
79        			<#assign catLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService")> 
80        			<#assign articleCatNames = catLocalService.getCategoryNames("com.liferay.journal.model.JournalArticle", getterUtil.getLong(journalArticle.resourcePrimKey))> 
81        			<#assign miRuta="/documents/${fitxategia_map.groupId}/${fileMi.getFileEntryId()}/${fitxategia_map.title}/${fitxategia_map.uuid}"> 
82        			<div class="documento">  
83                        <div class="tipo-peso"> 
84        					<#assign fileMimeT = fileMi.getMimeType()> 
85                            <a class="tipo" href="${miRuta}" target="_blank"><@tipoFichero fileMimeT/></a>                      
86                            <div class="peso"><@length fileMi /></div>  
87                        </div>  
88                        <div class="datos">  
89                            <div class="fecha-categorias"> 
90        					<span class="fecha">${data}</span> 
91        					<#assign cont = 0>					 
92        					<#foreach catName in articleCatNames>					 
93        						<span class="categoria">${catName}</span> 
94        						<#assign cont = cont + 1>						 
95        						<#if cont &lt; articleCatNames?size> | </#if>					 
96        					</#foreach>                     
97        					</div>  
98                            <div class="titulo"><a href="${miRuta}" target="_blank">${izena}</a> 
99                            </div>  
100                            <div class="descripcion">${deskribapena} 
101                            </div>  
102                        </div>  
103                    </div> 
104				</#if>     
105			</#if> 
106			 
107             
108		</#if>	 
109	</#foreach> 
110	</div> 
111</#if>