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@4d8c5b85"; 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									--> 
141									<div class="jssocials-share jssocials-share-facebook"> 
142										<a target="_blank" href="https://facebook.com/sharer/sharer.php?u=https://www.dgrm.mm.gov.pt/destaques?articleId=${articleId}" class="jssocials-share-link"> 
143											<i class="fa fa-facebook jssocials-share-logo"></i> 
144										</a> 
145									</div> 
146									<!-- 
147									 
148									<div class="jssocials-share jssocials-share-googleplus"> 
149										<a target="_blank" href="https://plus.google.com/share?url=https://www.dgrm.mm.gov.pt" class="jssocials-share-link"> 
150											<i class="fa fa-google jssocials-share-logo"></i> 
151										</a> 
152									</div> 
153									 
154									<div class="jssocials-share jssocials-share-linkedin"> 
155										<a target="_blank" href="https://www.linkedin.com/shareArticle?mini=true&amp;url=https://www.dgrm.mm.gov.pt" class="jssocials-share-link"> 
156											<i class="fa fa-linkedin jssocials-share-logo"></i> 
157										</a> 
158									</div> 
159									 
160									<div class="jssocials-share jssocials-share-whatsapp"> 
161										<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"> 
162											<i class="fa fa-whatsapp jssocials-share-logo"></i> 
163										</a> 
164									</div> 
165									--> 
166								</div> 
167							</div> 
168						 
169						</div> 
170 
171					</div> 
172					 
173				</div> 
174				 
175				<div class="col-md-12"> 
176					<#if imagemDetalhe??> 
177						<div class="col-md-9"> 
178							${conteudo} 
179						</div> 
180						<div class="col-md-3"> 
181 
182							<img style="width:100%;" src="${imagemDetalhe}"/> 
183						</div> 
184 
185					<#else> 
186						<div class="col-md-12"> 
187							${conteudo} 
188						</div> 
189					</#if>  
190					 
191				</div> 
192			</div> 
193		</#if> 
194	</div> 
195 
196	<div class="row" style="padding-top:30px;"> 
197		 
198		<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") /> 
199		<#assign assetLinkLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetLinkLocalService") /> 
200		<#assign currentArticleRelatedLinks = assetLinkLocalService.getDirectLinks(entry.getEntryId()) /> 
201 
202		<#if currentArticleRelatedLinks?has_content> 
203			<div class="col-md-10 col-md-offset-1" style="padding-top:30px;"> 
204				<h2 style="margin:0; padding-bottom:20px;"><@liferay.language key="portal.adt.content.noticias.relatedarticles"/></h2> 
205			</div> 
206		</#if> 
207		 
208		<#list currentArticleRelatedLinks as related_entry> 
209		    <#assign relatedAssetEntryId = related_entry.getEntryId2() /> 
210		    <#assign relatedAssetEntry = assetEntryLocalService.getEntry(relatedAssetEntryId) /> 
211		    <#assign relatedAssetEntryPrimKey = relatedAssetEntry.getClassPK() /> 
212		    <#assign relatedArticle = journalArticleLocalService.getLatestArticle(relatedAssetEntryPrimKey) /> 
213		    <#assign relatedArticleId = relatedArticle.getArticleId() /> 
214		     
215		    <#assign document = saxReaderUtil.read(relatedArticle.getContent()) /> 
216			<#assign rootElement = document.getRootElement() /> 
217	 
218			<#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='Titulo']") /> 
219			<#assign titulo = xPathSelector.selectSingleNode(rootElement).getStringValue() /> 
220			 
221			<#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='Resumo']") /> 
222			<#assign resumo = xPathSelector.selectSingleNode(rootElement).getStringValue() /> 
223 
224			<#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='Data4dgn']") /> 
225			<#assign data = xPathSelector.selectSingleNode(rootElement).getStringValue() /> 
226 
227			 
228		    <div class="col-md-10 col-md-offset-1" style="padding-top:30px;"> 
229 
230    			<div class="col-md-1"> 
231    				<#list relatedAssetEntry.getTags() as tag> 
232						<#if tag.name == "noticia"> 
233							<img style="width: 42px; height: 42px;" src="/documents/20143/31440/noticias.png.svg/bda0b1eb-2163-76da-b5ba-70a83dff7fc8"/> 
234						<#elseif tag.name == "servico"> 
235							<img style="width: 42px; height: 42px;" src="/documents/20143/31440/destaques.png.svg/5d66f27d-83b7-359d-ebf3-2f94cd4c26ac"/> 
236						<#elseif tag.name == "alerta"> 
237							<img style="width: 42px; height: 42px;" src="/documents/20143/31440/alerta.png.svg/dc6792ed-3434-51d7-7749-b7da46c00602"/> 
238						<#elseif tag.name == "legislacao"> 
239							<img style="width: 42px; height: 42px;" src="/documents/20143/31440/legislacao.png.svg/00664884-3efc-6d15-9403-124f5f0dd8ea"/> 
240						</#if> 
241					</#list> 
242    			</div> 
243    			<div class="col-md-11"> 
244    				<p style=" color: #ccc; font-size: 12px; margin:0;">${data}</P> 
245    				<a href="/destaques?articleId=${relatedAssetEntry.getEntryId()}"><h2 style="margin:0;">${titulo}</h2></a> 
246    				<p style="margin-top:10px;;">${resumo}</p> 
247    			</div> 
248    		</div> 
249		</#list> 
250 
251	</div> 
252</#if> 
253 
254<script> 
255    function printDiv(divName) { 
256	      
257    	$("#shareArea").hide() 
258 
259	    var printContents = document.getElementById(divName).innerHTML; 
260	    var originalContents = document.body.innerHTML; 
261 
262	    document.body.innerHTML = printContents; 
263 
264	    window.print(); 
265 
266	    document.body.innerHTML = originalContents; 
267 
268	    $("#shareArea").show() 
269 
270
271 
272</script>