处理模板时发生错误。
Method public static com.liferay.portlet.asset.model.AssetEntry com.liferay.portlet.asset.service.AssetEntryLocalServiceUtil.fetchEntry(java.lang.String,long) throws com.liferay.portal.kernel.exception.SystemException threw an exception
1<#assign serviceContext = staticUtil["com.liferay.portal.service.ServiceContextThreadLocal"].getServiceContext()> 2<#assign themeDisplay = serviceContext.getThemeDisplay() /> 3<#assign journalArticleId = .vars['reserved-article-id'].data> 4<#assign journalArticleResourceLocalServiceUtil = staticUtil["com.liferay.portlet.journal.service.JournalArticleResourceLocalServiceUtil"]> 5<#assign journalArticleLocalServiceUtil = staticUtil["com.liferay.portlet.journal.service.JournalArticleLocalServiceUtil"]> 6<#assign assetCategoryLocalServiceUtil = staticUtil["com.liferay.portlet.asset.service.AssetCategoryLocalServiceUtil"]> 7<#assign assetEntryLocalServiceUtil = staticUtil["com.liferay.portlet.asset.service.AssetEntryLocalServiceUtil"]> 8<#assign assetLinkLocalServiceUtil = staticUtil["com.liferay.portlet.asset.service.AssetLinkLocalServiceUtil"]> 9<#assign assetLinkLocalServiceUtil = staticUtil["com.liferay.portlet.asset.service.AssetLinkLocalServiceUtil"]> 10<#assign classNameLocalServiceUtil = staticUtil["com.liferay.portal.service.ClassNameLocalServiceUtil"]> 11<#assign dlService = staticUtil["com.liferay.portlet.documentlibrary.service.DLFileEntryLocalServiceUtil"]> 12<#assign ddmStructureLocalServiceUtil = staticUtil["com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalServiceUtil"]> 13<#assign articleResourcePK = journalArticleResourceLocalServiceUtil.getArticleResourcePrimKey(groupId, journalArticleId)/> 14<#assign assetEntry = assetEntryLocalServiceUtil.fetchEntry("com.liferay.portlet.journal.model.JournalArticle",articleResourcePK)/> 15<#assign saxReaderUtil = staticUtil["com.liferay.portal.kernel.xml.SAXReaderUtil"]> 16<#assign categoryList=assetCategoryLocalServiceUtil.getCategories("com.liferay.portlet.journal.model.JournalArticle",articleResourcePK) > 17<#assign linksList=assetLinkLocalServiceUtil.getDirectLinks(assetEntry.getEntryId()) > 18<#assign journalArticleClassNameId = classNameLocalServiceUtil.fetchClassName("com.liferay.portlet.journal.model.JournalArticle")> 19<div class="container"> 20 <div class="row"> 21 22 <div class="col-md-8 left_details generico interior-agenda"> 23 <h1 class="title2"> 24 ${R_TITULO.getData()} 25 </h1> 26 <!-- <div class="pull-left"> 27 <h1 class="title"> 28 ${R_TITULO.getData()} 29 </h1> 30 </div> 31 <!-- <div class="pull-right text-center lectura_facil"> 32 <a href="#"> 33 <img src="${themeDisplay.getPathThemeImages()}/icons/icon_lectura_facil.png" width="25" height="32" alt="Lectura fácil"> 34 <span>Lectura fácil</span> 35 </a> 36 </div> --> 37 38 <div class="clearfix"></div> 39 40 <div class="contenido"> 41 <#if T_RESUMEN.getData()?has_content> 42 <div class="clearfix"></div> 43 <div class="container-gray"> 44 <!-- <h4>Resumen</h4> --> 45 ${T_RESUMEN.getData()} 46 </div> 47 <div class="clearfix"></div> 48 </#if> 49 <#if R_CUERPO.getData()?has_content> 50 <!-- <h4>Cuerpo</h4> --> 51 <p>${R_CUERPO.getData()}</p> 52 </#if> 53 <#if P_IMAGEN.getData()?has_content> 54 <p><img alt="Imagen" src="${P_IMAGEN.getData()}" /></p> 55 </#if> 56 </div> 57 </div> 58 59 <!-- Area de la derecha --> 60 <div class="col-md-4 sidebar-right sidebar-min list-post"> 61 <#if F_ARCHIVOS_DESCARGA.getSiblings()?has_content && F_ARCHIVOS_DESCARGA.getSiblings()[0].getData()?contains("/")> 62 <div class="sidebar-module"> 63 <div class="title-blue border-bottom-black">Ficheros Relacionados</div> 64 <div class="post"> 65 <#list F_ARCHIVOS_DESCARGA.getSiblings() as cur_F_FICHEROS_RELACIONADOS> 66 <#assign index = 0/> 67 <#list cur_F_FICHEROS_RELACIONADOS.getData()?split("/") as urlChunks> 68 <#if index == 2> 69 <#assign groupIdChunk = urlChunks/> 70 <#assign gid = getterUtil.getLong(groupIdChunk)/> 71 </#if> 72 <#if index == 3> 73 <#assign fid = getterUtil.getLong(urlChunks)/> 74 </#if> 75 <#if index == 4> 76 <#assign fileTitle = urlChunks/> 77 </#if> 78 <#if index == 5> 79 <#assign uuid = urlChunks/> 80 </#if> 81 <#assign index = index + 1/> 82 </#list> 83 <#assign fileEntry = dlService.fetchDLFileEntryByUuidAndGroupId(uuid, getterUtil.getLong(gid))/> 84 <a href="${cur_F_FICHEROS_RELACIONADOS.getData()}"> 85 <div class="title title-post-min"> 86 <#if fileEntry.getDescription()?has_content> 87 ${fileEntry.getDescription()} 88 <#else> 89 ${httpUtil.decodeURL(fileEntry.getTitle(),true)} 90 </#if> 91 </div> 92 <div class="btn_download"> 93 DESCARGAR DOCUMENTO 94 <img src="${themeDisplay.getPathThemeImages()}/icons/icon_arrow_bottom_red.png" alt="Descargar"/> 95 </div> 96 </a> 97 </#list> 98 </div> 99 </div> 100 </#if> 101 102 <!-- Enlaces relacionados --> 103 <#assign enlaces = [] /> 104 <#assign docRelacionados = [] /> 105 106 <#if linksList?has_content > 107 <#list linksList as currentLink> 108 <#assign entry = assetEntryLocalServiceUtil.getAssetEntry(currentLink.getEntryId2()) /> 109 <#if entry.getClassNameId() == journalArticleClassNameId. getClassNameId()> 110 <#assign journalArticle = journalArticleLocalServiceUtil.getLatestArticle(entry.getClassPK()) /> 111 <#assign structure = ddmStructureLocalServiceUtil.fetchStructure(groupId, journalArticleClassNameId.getClassNameId(), journalArticle.getStructureId()) /> 112 <#if structure.getName(themeDisplay.getLocale()) == "MS_EST_ENLACE"> 113 <#assign enlaces = enlaces + [entry] /> 114 <#else> 115 <#assign docRelacionados = docRelacionados + [entry] /> 116 </#if> 117 <#else> 118 <#assign docRelacionados = docRelacionados + [entry] /> 119 </#if> 120 </#list> 121 </#if> 122 123 124 <#if enlaces?has_content> 125 126 <div class="sidebar-module"> 127 <div class="title-blue border-bottom-black">Ampliar información...</div> 128 <#list enlaces as currentLink> 129 <#assign targetCategoryList= assetCategoryLocalServiceUtil.getEntryCategories(currentLink.getEntryId()) > 130 <#assign targetJournalArticle = journalArticleLocalServiceUtil.getLatestArticle(currentLink.getClassPK()) > 131 <#assign targetDocument = saxReaderUtil.read(targetJournalArticle.getContentByLocale(themeDisplay.getLocale())) > 132 <#assign targetRoot = targetDocument.getRootElement()> 133 <#list targetRoot.elements() as field> 134 <#if "T_TEXTO_ENLACE" == field.attributeValue("name")> 135 <#assign currentLinkText = field.element("dynamic-content").getText() > 136 </#if> 137 <#if "T_URL" == field.attributeValue("name")> 138 <#assign currentLinkURL = field.element("dynamic-content").getText() > 139 </#if> 140 <#if "B_NEW_WINDOW" == field.attributeValue("name")> 141 <#assign opensNewWindow = getterUtil.getBoolean(field.element("dynamic-content").getText()) > 142 </#if> 143 </#list> 144 <#if opensNewWindow> 145 <#assign targetValue = "_blank"> 146 <#else> 147 <#assign targetValue = "_self"> 148 </#if> 149 <div class="post"> 150 <div class="title"> 151 <a href="${currentLinkURL}" target="${targetValue}"> 152 ${currentLinkText} 153 </a> 154 </div> 155 <#if targetCategoryList?has_content> 156 <div class="category"> 157 <#list targetCategoryList as currentTargetCategory> 158 ${currentTargetCategory.getName()} <span>|</span> 159 </#list> 160 </div> 161 </#if> 162 </div> 163 164 </#list> 165 </div> 166 </#if> 167 168 <#if docRelacionados?has_content > 169 <div class="sidebar-module"> 170 <div class="title-blue border-bottom-black">Contenidos relacionados</div> 171 <#list docRelacionados as currentLink> 172 <#assign targetCategoryList= assetCategoryLocalServiceUtil.getEntryCategories(currentLink.getEntryId()) > 173 <div class="post"> 174 <div class="title"> 175 <a href="${themeDisplay.getPathFriendlyURLPublic()}${themeDisplay.getScopeGroup().getFriendlyURL()}/-/${currentLink.getAssetRenderer().getUrlTitle()}" target="_blank"> 176 ${currentLink.getTitleCurrentValue()} 177 </a> 178 </div> 179 <#if targetCategoryList?has_content> 180 <div class="category"> 181 <#list targetCategoryList as currentTargetCategory> 182 ${currentTargetCategory.getName()} <span>|</span> 183 </#list> 184 </div> 185 </#if> 186 </div> 187 </#list> 188 </div> 189 </#if> 190 </div> 191 </div> 192</div>