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

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign entry = assetEntryLocalServic...  [in template "20116#20152#31697" at line 63, column 9]
----
1<#assign serviceContext = staticUtil["com.liferay.portal.kernel.service.ServiceContextThreadLocal"].getServiceContext()> 
2<#assign httpServletRequest = serviceContext.getRequest()> 
3 
4<#if !httpServletRequest.getParameter('articleId')??> 
5 
6	<div class="row" style="margin-top:20px;"> 
7 
8	    <div class="col-md-10 col-md-offset-1" style="padding-top:20px;"> 
9	     
10		    <#if entries?has_content> 
11		    	<#list entries as curEntry> 
12 
13		    		<#assign renderer = curEntry.getAssetRenderer() /> 
14					<#assign className = renderer.getClassName() /> 
15 
16					<#if className == "com.liferay.journal.model.JournalArticle"> 
17						<#assign journalArticle = renderer.getArticle() /> 
18						<#assign document = saxReaderUtil.read(journalArticle.getContent()) /> 
19						<#assign rootElement = document.getRootElement() /> 
20				 
21						<#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='Titulo']") /> 
22						<#assign titulo = xPathSelector.selectSingleNode(rootElement).getStringValue() /> 
23						 
24						<#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='Resumo']") /> 
25						<#assign resumo = xPathSelector.selectSingleNode(rootElement).getStringValue() /> 
26 
27						<#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='Data4dgn']") /> 
28						<#assign data = xPathSelector.selectSingleNode(rootElement).getStringValue() /> 
29						 
30			    		<div class="col-md-12" style="padding-top:30px;"> 
31			    			<div class="col-md-1"> 
32			    				<#list curEntry.getTags() as tag> 
33									<#if tag.name == "noticia"> 
34										<img style="width: 42px; height: 42px;" src="/documents/20143/31440/noticias.png.svg/bda0b1eb-2163-76da-b5ba-70a83dff7fc8"/> 
35									<#elseif tag.name == "servicodestaque"> 
36										<img style="width: 42px; height: 42px;" src="/documents/20143/31440/destaques.png.svg/5d66f27d-83b7-359d-ebf3-2f94cd4c26ac"/> 
37									<#elseif tag.name == "alerta"> 
38										<img style="width: 42px; height: 42px;" src="/documents/20143/31440/alerta.png.svg/dc6792ed-3434-51d7-7749-b7da46c00602"/> 
39									<#elseif tag.name == "legislacao"> 
40										<img style="width: 42px; height: 42px;" src="/documents/20143/31440/legislacao.png.svg/00664884-3efc-6d15-9403-124f5f0dd8ea"/> 
41									</#if> 
42								</#list> 
43			    			</div> 
44			    			<div class="col-md-11"> 
45			    				<p style=" color: #ccc; font-size: 12px; margin:0;">${data}</P> 
46			    				<a href="/destaques?articleId=${curEntry.getEntryId()}"><h4 style="margin:0;">${titulo}</h4></a> 
47			    				<p style="margin-top:10px;;">${resumo}</p> 
48			    			</div> 
49			    		</div> 
50			    	</#if> 
51		    		 
52		    	</#list> 
53		    </#if> 
54 
55		</div> 
56 
57	</div> 
58 
59<#else> 
60 
61	<#assign articleId = httpServletRequest.getParameter('articleId')?number> 
62	<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") /> 
63	<#assign entry = assetEntryLocalService.getEntry(articleId) /> 
64 
65	<div class="row" id="printableArea"> 
66		 
67		<#assign renderer = entry.getAssetRenderer() /> 
68		<#assign className = renderer.getClassName() /> 
69 
70		<#if className == "com.liferay.journal.model.JournalArticle"> 
71			<#assign journalArticle = renderer.getArticle() /> 
72			<#assign document = saxReaderUtil.read(journalArticle.getContent()) /> 
73			<#assign rootElement = document.getRootElement() /> 
74 
75			<#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='Titulo']") /> 
76			<#assign titulo = xPathSelector.selectSingleNode(rootElement).getStringValue() /> 
77			 
78			<#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='Conteudo']") /> 
79			<#assign conteudo = xPathSelector.selectSingleNode(rootElement).getStringValue() /> 
80 
81			<#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='Data4dgn']") /> 
82			<#assign data = xPathSelector.selectSingleNode(rootElement).getStringValue() /> 
83 
84			<#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='ImagemDestaque']") /> 
85			<#assign imagem = xPathSelector.selectSingleNode(rootElement).getStringValue() /> 
86 
87			<#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='ImagemDetalhe']") /> 
88			 
89			<#if xPathSelector.selectSingleNode(rootElement)??> 
90				<#assign imagemDetalhe = xPathSelector.selectSingleNode(rootElement).getStringValue() /> 
91			</#if>  
92 
93			<div class="col-md-10 col-md-offset-1"> 
94				 
95				<div class="col-md-12" style="padding-top:50px; padding-bottom:50px;"> 
96					 
97					<div class="col-md-9"> 
98						<div class="col-md-1"> 
99							<#list entry.getTags() as tag> 
100								<#if tag.name == "noticia"> 
101									<img style="width: 42px; height: 42px;" src="/documents/20143/31440/noticias.png.svg/bda0b1eb-2163-76da-b5ba-70a83dff7fc8"/> 
102								<#elseif tag.name == "servicodestaque"> 
103									<img style="width: 42px; height: 42px;" src="/documents/20143/31440/destaques.png.svg/5d66f27d-83b7-359d-ebf3-2f94cd4c26ac"/> 
104								<#elseif tag.name == "alerta"> 
105									<img style="width: 42px; height: 42px;" src="/documents/20143/31440/alerta.png.svg/dc6792ed-3434-51d7-7749-b7da46c00602"/> 
106								<#elseif tag.name == "legislacao"> 
107									<img style="width: 42px; height: 42px;" src="/documents/20143/31440/legislacao.png.svg/00664884-3efc-6d15-9403-124f5f0dd8ea"/> 
108								</#if> 
109							</#list> 
110						</div> 
111						<div class="col-md-11"> 
112							<p style="color: gray; margin: 0;">${data}</p> 
113							<h4 style="margin: 0;">${titulo}</h4> 
114						</div> 
115					</div> 
116					<div class="col-md-3"> 
117 
118						<div class="col-md-12" style="padding-bottom:20px;" id="shareArea"> 
119							<div id="shareIcons" class="jssocials" style="font-size: 14px;"> 
120								<div class="jssocials-shares"> 
121									 
122									<div class="jssocials-share jssocials-share-email"> 
123										<a target="_self" href="#"> 
124											<span class="fa fa-print jssocials-share-logo" aria-hidden="true" onclick="printDiv('printableArea')"></span> 
125										</a> 
126									</div> 
127									 
128									<div class="jssocials-share jssocials-share-email"> 
129										<a target="_self" href="mailto:?subject=Share DGRM Website Content" class="jssocials-share-link"> 
130											<i class="fa fa-at jssocials-share-logo"></i> 
131										</a> 
132									</div> 
133									<!-- 
134									<div class="jssocials-share jssocials-share-twitter"> 
135										<a target="_blank" href="https://twitter.com/share?url=https://www.dgrm.mm.gov.pt;text=Direcção-Geral de Resursos Naturais, Segurança e Serviços Maritimos" class="jssocials-share-link"> 
136											<i class="fa fa-twitter jssocials-share-logo"></i> 
137										</a> 
138									</div> 
139									 
140									<div class="jssocials-share jssocials-share-facebook"> 
141										<a target="_blank" href="https://facebook.com/sharer/sharer.php?u=https://www.dgrm.mm.gov.pt" class="jssocials-share-link"> 
142											<i class="fa fa-facebook jssocials-share-logo"></i> 
143										</a> 
144									</div> 
145									 
146									<div class="jssocials-share jssocials-share-googleplus"> 
147										<a target="_blank" href="https://plus.google.com/share?url=https://www.dgrm.mm.gov.pt" class="jssocials-share-link"> 
148											<i class="fa fa-google jssocials-share-logo"></i> 
149										</a> 
150									</div> 
151									 
152									<div class="jssocials-share jssocials-share-linkedin"> 
153										<a target="_blank" href="https://www.linkedin.com/shareArticle?mini=true&amp;url=https://www.dgrm.mm.gov.pt" class="jssocials-share-link"> 
154											<i class="fa fa-linkedin jssocials-share-logo"></i> 
155										</a> 
156									</div> 
157									 
158									<div class="jssocials-share jssocials-share-whatsapp"> 
159										<a target="_self" href="whatsapp://send?text=https://www.dgrm.mm.gov.pt Direcção-Geral de Resursos Naturais, Segurança e Serviços Maritimos" class="jssocials-share-link"> 
160											<i class="fa fa-whatsapp jssocials-share-logo"></i> 
161										</a> 
162									</div> 
163									--> 
164								</div> 
165							</div> 
166						 
167						</div> 
168 
169					</div> 
170					 
171				</div> 
172				 
173				<div class="col-md-12"> 
174					<#if imagemDetalhe??> 
175						<div class="col-md-9"> 
176							${conteudo} 
177						</div> 
178						<div class="col-md-3"> 
179 
180							<img style="width:100%;" src="${imagemDetalhe}"/> 
181						</div> 
182 
183					<#else> 
184						<div class="col-md-12"> 
185							${conteudo} 
186						</div> 
187					</#if>  
188					 
189				</div> 
190			</div> 
191		</#if> 
192	</div> 
193 
194	<div class="row" style="padding-top:30px;"> 
195		 
196		<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") /> 
197		<#assign assetLinkLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetLinkLocalService") /> 
198		<#assign currentArticleRelatedLinks = assetLinkLocalService.getDirectLinks(entry.getEntryId()) /> 
199 
200		<#if currentArticleRelatedLinks?has_content> 
201			<div class="col-md-10 col-md-offset-1" style="padding-top:30px;"> 
202				<h2 style="margin:0; padding-bottom:20px;"><@liferay.language key="portal.adt.content.noticias.relatedarticles"/></h2> 
203			</div> 
204		</#if> 
205		 
206		<#list currentArticleRelatedLinks as related_entry> 
207		    <#assign relatedAssetEntryId = related_entry.getEntryId2() /> 
208		    <#assign relatedAssetEntry = assetEntryLocalService.getEntry(relatedAssetEntryId) /> 
209		    <#assign relatedAssetEntryPrimKey = relatedAssetEntry.getClassPK() /> 
210		    <#assign relatedArticle = journalArticleLocalService.getLatestArticle(relatedAssetEntryPrimKey) /> 
211		    <#assign relatedArticleId = relatedArticle.getArticleId() /> 
212		     
213		    <#assign document = saxReaderUtil.read(relatedArticle.getContent()) /> 
214			<#assign rootElement = document.getRootElement() /> 
215	 
216			<#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='Titulo']") /> 
217			<#assign titulo = xPathSelector.selectSingleNode(rootElement).getStringValue() /> 
218			 
219			<#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='Resumo']") /> 
220			<#assign resumo = xPathSelector.selectSingleNode(rootElement).getStringValue() /> 
221 
222			<#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='Data4dgn']") /> 
223			<#assign data = xPathSelector.selectSingleNode(rootElement).getStringValue() /> 
224 
225			 
226		    <div class="col-md-10 col-md-offset-1" style="padding-top:30px;"> 
227 
228    			<div class="col-md-1"> 
229    				<#list relatedAssetEntry.getTags() as tag> 
230						<#if tag.name == "noticia"> 
231							<img style="width: 42px; height: 42px;" src="/documents/20143/31440/noticias.png.svg/bda0b1eb-2163-76da-b5ba-70a83dff7fc8"/> 
232						<#elseif tag.name == "servico"> 
233							<img style="width: 42px; height: 42px;" src="/documents/20143/31440/destaques.png.svg/5d66f27d-83b7-359d-ebf3-2f94cd4c26ac"/> 
234						<#elseif tag.name == "alerta"> 
235							<img style="width: 42px; height: 42px;" src="/documents/20143/31440/alerta.png.svg/dc6792ed-3434-51d7-7749-b7da46c00602"/> 
236						<#elseif tag.name == "legislacao"> 
237							<img style="width: 42px; height: 42px;" src="/documents/20143/31440/legislacao.png.svg/00664884-3efc-6d15-9403-124f5f0dd8ea"/> 
238						</#if> 
239					</#list> 
240    			</div> 
241    			<div class="col-md-11"> 
242    				<p style=" color: #ccc; font-size: 12px; margin:0;">${data}</P> 
243    				<a href="/destaques?articleId=${relatedAssetEntry.getEntryId()}"><h2 style="margin:0;">${titulo}</h2></a> 
244    				<p style="margin-top:10px;;">${resumo}</p> 
245    			</div> 
246    		</div> 
247		</#list> 
248 
249	</div> 
250</#if> 
251 
252<script> 
253    function printDiv(divName) { 
254	      
255    	$("#shareArea").hide() 
256 
257	    var printContents = document.getElementById(divName).innerHTML; 
258	    var originalContents = document.body.innerHTML; 
259 
260	    document.body.innerHTML = printContents; 
261 
262	    window.print(); 
263 
264	    document.body.innerHTML = originalContents; 
265 
266	    $("#shareArea").show() 
267 
268
269 
270</script>