Si è verificato un errore nell'elaborarazione del modello.
Java method "com.sun.proxy.$Proxy430.getLatestArticle(long)" threw an exception when invoked on com.sun.proxy.$Proxy430 object "it.arca.wrapper.PersonaStruttura@102005e5"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign ra = journalArticleLocalServi...  [in template "425847#425881#197821" at line 170, column 19]
----
1<#assign groupService = serviceLocator.findService("com.liferay.portal.kernel.service.GroupLocalService")> 
2<#-- Get themeDisplay --> 
3<#assign arcaLocalService = serviceLocator.findService("it.arca.service.service.ArcaLocalService") /> 
4 
5<#assign jsonFactoryUtil = staticUtil["com.liferay.portal.kernel.json.JSONFactoryUtil"] /> 
6 
7<#assign serviceContext = staticUtil["com.liferay.portal.kernel.service.ServiceContextThreadLocal"].getServiceContext() /> 
8<#assign themeDisplay = serviceContext.getThemeDisplay() /> 
9 
10<#-- Data format --> 
11<#setting time_zone = languageUtil.get(locale, "template-timezone") /> 
12<#assign originalLocale = locale /> 
13<#setting locale = localeUtil.getDefault() /> 
14<#assign displayDate = .vars['reserved-article-modified-date'].data /> 
15<#assign displayDate = displayDate?datetime("EEE, d MMM yyyy HH:mm:ss Z") /> 
16<#setting locale = originalLocale /> 
17<#assign displayDateDay = displayDate?string("dd") /> 
18<#assign displayDateMonth = displayDate?string("MM") /> 
19<#assign displayDateYear = displayDate?string("YYYY") /> 
20 
21<#-- Get info File --> 
22<#assign dLFileLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService") /> 
23<#assign textFormatter = staticUtil["com.liferay.portal.kernel.util.TextFormatter"]> 
24 
25<#-- Get Category --> 
26<#assign vocabularyService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyLocalService")> 
27<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") /> 
28<#assign categoryService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService")> 
29<#assign catpropertyService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryPropertyLocalService") /> 
30<#assign vocabularyHoncode = vocabularyService.getGroupVocabulary(groupId, "Honcode") /> 
31<#assign currentArticle = journalArticleLocalService.getArticle(groupId, .vars['reserved-article-id'].data) /> 
32 <#assign currentArticleResourcePrimKey = currentArticle.getResourcePrimKey() /> 
33<#assign categoryList=categoryService.getCategories("com.liferay.journal.model.JournalArticle",currentArticleResourcePrimKey) > 
34 
35<#-- Get Tag --> 
36<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") /> 
37<#assign assetTagLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetTagLocalService")> 
38 
39<#-- Get Related Asset --> 
40<#assign assetLinkLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetLinkLocalService") /> 
41<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") /> 
42<#assign currentArticle = journalArticleLocalService.getArticle(groupId, .vars['reserved-article-id'].data) /> 
43<#assign currentArticleResourcePrimKey = currentArticle.getResourcePrimKey() /> 
44<#assign tagList=assetTagLocalService.getTags("com.liferay.journal.model.JournalArticle",currentArticleResourcePrimKey) > 
45<#assign currentArticleAssetEntry = assetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle", currentArticleResourcePrimKey) /> 
46<#assign currentArticleAssetEntryId = currentArticleAssetEntry.getEntryId() /> 
47<#assign currentArticleRelatedLinks = assetLinkLocalService.getDirectLinks(currentArticleAssetEntryId) /> 
48 
49<#assign arcaLocalService = serviceLocator.findService("it.arca.service.service.ArcaLocalService") /> 
50<#assign classeColore = arcaLocalService.getSelettoreCss(.vars['reserved-article-id'].data,'0') /> 
51<#assign arcaSezioniBackgroundcolorCss = 'arca-sezioni-backgroundcolor-' + classeColore /> 
52<#assign arcaSezioniColorCss = 'arca-sezioni-color-' + classeColore /> 
53<#assign arcaSezioniBorderColorCss = 'arca-sezioni-bordercolor-' + classeColore /> 
54<#assign arcaSezioniHrcolor = 'arca-sezioni-hrcolor-' + classeColore /> 
55 
56<#assign countNota = 0 /> 
57<#assign countDocumento = 0 /> 
58<#list currentArticleRelatedLinks as related_entry> 
59    <#assign relatedAssetEntry = assetEntryLocalService.getEntry(related_entry.getEntryId2()) /> 
60    <#assign relatedArticle = journalArticleLocalService.getLatestArticle(relatedAssetEntry.getClassPK()) /> 
61    <#assign relatedArticleStructureName = relatedArticle.getDDMStructure().getName(locale) /> 
62    <#if relatedArticleStructureName == 'Asset Nota'> 
63        <#assign countNota = countNota + 1 /> 
64    </#if> 
65</#list> 
66 
67<div class="detail row newsletter-first-news"> 
68    <div class="col-lg-12"> 
69        <#if immagine.getData() !=''> 
70            <figure class="text-center"> 
71                <img src="${immagine.getData()}" alt="${titolo.getData()}" /> 
72                <#assign file=getDlFileEntry(immagine.getData()) /> 
73                <figcaption>${file.getDescription()}</figcaption> 
74            </figure> 
75        </#if> 
76 
77        <#if titolo.getData() !=''> 
78            <h1 class="newsletterH1"> 
79                ${titolo.getData()} 
80            </h1> 
81            <h6>${displayDateDay}/${displayDateMonth}/${displayDateYear}</h6> 
82        </#if> 
83 
84        <#if countNota &gt; 0 > 
85            <div class="related-info"> 
86                <#list currentArticleRelatedLinks as related_entry> 
87                    <#assign relatedAssetEntry = assetEntryLocalService.getEntry(related_entry.getEntryId2()) /> 
88                    <#assign relatedArticle = journalArticleLocalService.getLatestArticle(relatedAssetEntry.getClassPK()) /> 
89                    <#assign relatedArticleStructureName = relatedArticle.getDDMStructure().getName(locale) /> 
90                    <#assign doc = saxReaderUtil.read(relatedArticle.getContentByLocale(localeUtil.toLanguageId(localeUtil.getDefault()))) /> 
91                    <#assign rootElement = doc.getRootElement() /> 
92                    <#if relatedArticleStructureName == 'Asset Nota'> 
93                        <#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='titolo']") /> 
94                        <#assign titoloNota = xPathSelector.selectSingleNode(rootElement).getStringValue() /> 
95                        <#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='descrizione']/dynamic-content") /> 
96                        <#assign testoNota = xPathSelector.selectSingleNode(rootElement).getStringValue() /> 
97 
98                        <p><strong>${titoloNota}:</strong></p> 
99                        <p>${testoNota}</p> 
100                    </#if> 
101                </#list> 
102            </div> 
103        </#if> 
104 
105 
106		<#if descrizione.getData() !=''> 
107			<#if getterUtil.getBoolean(descrizione.flAccordionDescrizione.getData() == "true") > 
108				<#assign descrLength = descrizione.getData()?length /> 
109 
110					 
111				<div class="eus-read-more module"> 
112					<div role="heading" class="collapse" id="${themeDisplay.getPortletDisplay().getId()}_collapseExample" aria-expanded="false"> 
113						<div id="${themeDisplay.getPortletDisplay().getId()}_id-arca-shadow" class="arca-shadow"></div>  
114						<p>${descrizione.getData()}</p> 
115					</div> 
116					<a role="button" class="${arcaSezioniColorCss} collapsed ${themeDisplay.getPortletDisplay().getId()}_lastLink lastLink" data-toggle="collapse" href="#${themeDisplay.getPortletDisplay().getId()}_collapseExample" aria-expanded="false" aria-controls="${themeDisplay.getPortletDisplay().getId()}_collapseExample"></a> 
117				</div> 
118						 
119					 
120			<#else> 
121				  <div class="eus-read-more"> 
122						<p>${descrizione.getData()}</p> 
123				  </div> 
124			</#if> 
125		</#if> 
126 
127 
128        <#if tagList??> 
129        <div class="tags"> 
130            <#list tagList as tagList> 
131                <span class="tag">${tagList.getName()}</span> 
132            </#list> 
133        </div> 
134        </#if> 
135    </div> 
136</div> 
137 
138<div class="eus-accordion newsletter-list-news"> 
139<#if titoloElementoNL.getSiblings()?has_content> 
140	<#list titoloElementoNL.getSiblings() as cur_titoloElementoNL> 
141 
142    <div class="detail row panel-heading"> 
143      <div class="col-md-4"> 
144        <#if cur_titoloElementoNL.immagineElementoNL.getData() != ''> 
145          <img class="" src="${cur_titoloElementoNL.immagineElementoNL.getData()}" alt="${cur_titoloElementoNL.getData()}" /> 
146        </#if> 
147      </div> 
148      <div class="col-md-8"> 
149        <#if cur_titoloElementoNL.getData() != ''> 
150          <div class="detail row"> 
151           <#--   <h6>${displayDateDay}/${displayDateMonth}/${displayDateYear}</h6>--> 
152            <h4 class="newsletterH4"> 
153            ${cur_titoloElementoNL.getData()} 
154            </h4> 
155          </div> 
156        </#if> 
157 
158        <#if cur_titoloElementoNL.DescrizioneElementoNewsletter.getData() != ''> 
159          <div class="detail row"> 
160 
161            ${cur_titoloElementoNL.DescrizioneElementoNewsletter.getData()} 
162 
163          </div> 
164        </#if> 
165 
166        <#if cur_titoloElementoNL.collegamentoInternoElementoNL.getData() != ''> 
167          <div class="detail row"> 
168 
169		  <#assign classId = jsonFactoryUtil.createJSONObject(cur_titoloElementoNL.collegamentoInternoElementoNL.getData()).getLong("classPK") /> 
170		  <#assign ra = journalArticleLocalService.getLatestArticle(classId) /> 
171		  <#assign urlFromArticleId = arcaLocalService.getUrlFromArticleId(ra.getArticleId()) /> 
172 
173            <p><a class="eus-link-interno pull-right" href="${urlFromArticleId}"> 
174              Leggi di più 
175            </a></p> 
176          </div> 
177        </#if> 
178      </div> 
179    </div> 
180	</#list> 
181</#if> 
182</div> 
183 
184<script type="text/javascript"> 
185	AUI().use('aui-base', function(A) { 
186	    if(A.one('.text .accordion')){ 
187 
188        var allps = A.one('.text .accordion').all('p'); 
189        var pHeight = 0; 
190 
191        if(allps){ 
192 
193          allps.each(function(p){ 
194            pHeight = pHeight + p.height(); 
195          }); 
196 
197          if(pHeight > 170){ 
198            A.one(".text .icon-angle-down").show(); 
199          }else{ 
200            A.one(".text .icon-angle-down").hide(); 
201
202
203 
204        A.one(".text .icon-angle-down").on('click', function(event) { 
205          A.one(".accordion").setStyle('height', 'auto'); 
206          A.one(".text .icon-angle-down").hide(); 
207          A.one(".text .icon-angle-up").show(); 
208          A.one(".text .gradient").hide(); 
209        }); 
210        A.one(".text .icon-angle-up").on('click', function(event) { 
211          A.one(".accordion").setStyle('height', '190px'); 
212          A.one(".text .icon-angle-down").show(); 
213          A.one(".text .icon-angle-up").hide(); 
214          A.one(".text .gradient").show(); 
215        }); 
216 
217
218	}); 
219</script> 
220<script> 
221$(document).ready(function() { 
222		var idCollapseExample = '#${themeDisplay.getPortletDisplay().getId()}_collapseExample'; 
223		var idArcaShadow = '#${themeDisplay.getPortletDisplay().getId()}_id-arca-shadow'; 
224		var lastLink = '.${themeDisplay.getPortletDisplay().getId()}_lastLink'; 
225 
226 
227		if ($(idCollapseExample) && $(idCollapseExample)[0] && $(idCollapseExample)[0].scrollHeight && $(idCollapseExample).innerHeight() ) 
228
229		if ($(idCollapseExample)[0].scrollHeight > $(idCollapseExample).innerHeight()) { 
230			//$('#id-arca-shadow').show(); 
231			//$('#lastLink').show(); 
232
233		else 
234
235			$(idArcaShadow).hide(); 
236			$(lastLink).hide(); 
237			$(idCollapseExample).removeClass("collapse"); 
238
239
240    }) 
241</script> 
242 
243 
244 
245<#function getDlFileEntry url> 
246    <#assign parts=url?string?split("/") /> 
247    <#assign groupId=parts[2]?number /> 
248    <#assign uuid=parts[5]?string?split("?")[0] /> 
249    <#assign dlFileEntry=dLFileLocalService.fetchDLFileEntryByUuidAndGroupId(uuid, groupId)! /> 
250    <#return dlFileEntry /> 
251</#function> 
252 
253<#function getRelatedAsset related> 
254    <#assign parts=url?string?split("/") /> 
255    <#assign groupId=parts[2]?number /> 
256    <#assign uuid=parts[5]?string?split("?")[0] /> 
257    <#assign dlFileEntry=dLFileLocalService.fetchDLFileEntryByUuidAndGroupId(uuid, groupId)! /> 
258    <#return dlFileEntry /> 
259</#function>