Recomanació

S'ha produït un error mentre es processava la plantilla.
The following has evaluated to null or missing:
==> serviceLocator.findService("com.liferay.asset.kernel.service.AssetLinkLocalService")  [in template "10901#10934#NOVETAT_DETALL_PRESTATGE_POPUP" at line 15, column 25]

----
Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign assetLinkSvc = serviceLocator...  [in template "10901#10934#NOVETAT_DETALL_PRESTATGE_POPUP" at line 15, column 1]
----
1<#assign id = .vars['reserved-article-id'].data> 
2<#assign urltitle = .vars['reserved-article-url-title'].data> 
3 
4 
5<script type="text/javascript"> 
6    function saveEntryAction(formName){ 
7		document.getElementById(formName).articleId.value=${id}; 
8		document.getElementById(formName).groupId.value=${getterUtil.getLong(groupId)}; 
9		document.getElementById(formName).submit(); 
10
11</script> 
12<#assign assetEntrySvc = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService")>    
13<#assign articleSvc = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")>    
14<#assign classNameSvc = serviceLocator.findService("com.liferay.portal.kernel.service.ClassNameLocalService")>  
15<#assign assetLinkSvc = serviceLocator.findService("com.liferay.asset.kernel.service.AssetLinkLocalService")> 
16<#assign userService =serviceLocator.findService("com.liferay.portal.kernel.service.UserLocalService")> 
17<#assign geniusGroupId="6200569"> 
18<#if (scopeGroupId?number != geniusGroupId?number)> 
19	<div class="recommendationDetail"> 
20		<div class="valoraciones"> 
21        <#if (validator.isNotNull(user) && !user.isDefaultUser()) > 
22            <form name="fmGuardarRecomendacion${id}" action="" method="post"> 
23                 <input type="button" class="botoDesar" name="save" value="Desa" onclick="javascript:saveEntryAction("fmGuardarRecomendacion${id}");"/> 
24            </form> 
25	    </#if> 
26	</div> 
27		<div class="recommendationData"> 
28			<div class="recommendationValoraciones">																								 
29                <#assign articleClass = classNameSvc.getClassName("com.liferay.journal.model.JournalArticle")> 
30                <#assign articleId = id> 
31                <#assign groupIdLong = getterUtil.getLong(groupId) > 
32                <#assign article = articleSvc.getArticle(groupIdLong, articleId)> 
33                <!--##Corrección 6.1: caso en el que el article pertenece a Global--> 
34                <#if validator.isNotNull(article) && article!=""> 
35                    <#assign groupSvc = serviceLocator.findService("com.liferay.portal.kernel.service.GroupLocalService")> 
36                    <#assign groupIdLong = getterUtil.getLong(groupSvc.getCompanyGroup(companyId).getGroupId())> 
37                    <#assign article = articleSvc.getArticle(groupIdLong, articleId)> 
38                </#if> 
39 
40                <!--##Fin corrección 6.1--> 
41                <#if ( article!="" )> 
42                    <#assign assetEntry = assetEntrySvc.fetchEntry(articleClass.getClassName(), article.getResourcePrimKey())> 
43                    <#assign assetEntryId = assetEntry.getEntryId()> 
44                    <#assign assetEntryIdLong = getterUtil.getLong(assetEntryId)> 
45                     
46                     
47                    <#assign assetLinks = assetLinkSvc.getDirectLinks(assetEntryIdLong)> 
48                    <#if assetLinks?has_content> 
49                        <#list assetLinks as assetLink> 
50                            <#if (getterUtil.getLong(assetLink.getEntryId1()) == assetEntryIdLong) > 
51                                <#assign assetLinkEntry = assetEntrySvc.getEntry(getterUtil.getLong(assetLink.getEntryId2()))>		 
52                            <#else> 
53                                <#assign assetLinkEntry = assetEntrySvc.getEntry(getterUtil.getLong(assetLink.getEntryId1()))> 
54                            </#if>							 
55 
56                            <#assign classPK = assetLinkEntry.getClassPK()> 
57 
58                            <#assign relatedArticle = articleSvc.getLatestArticle(getterUtil.getLong(classPK))> 
59 
60                            <#if (relatedArticle!="")> 
61                                <#assign relatedStructureId = relatedArticle.structureId> 
62 
63                                <#if (relatedStructureId == "DOCUMENT_RECOMANAT" )> 
64                                    <#assign relatedArticleTemplateId = "RECOMANACIÓ_" + relatedStructureId> 
65                                <#else> 
66                                    <#assign relatedArticleTemplateId = "RECOMANACIÓ_ALTRE"> 
67                                </#if> 
68                                <#assign languageId = localeUtil.toLanguageId(locale)> 
69 
70                                <!-- IMG de RECOMANACIÓ --> 
71                                <!-- 
72                                <#if image.getData()?has_content && image.getData()?length != 0> 
73                                	<#assign imgSrc = image.getData()> 
74                                <#else> 
75                                	<#assign imgSrc = image.urlExterna.getData()> 
76                                </#if> 
77                                 
78                                <#if (imgSrc!="" )> 
79                                    <p class="img"><img src="${imgSrc}" alt="${title.getData()}" /></p> 
80                                </#if> 
81                                --> 
82                                 
83                                <!-- IMG de DOCUMENT_RECOMANAT --> 
84                                ${journalContentUtil.getContent(groupIdLong,relatedArticle.articleId,relatedArticleTemplateId,viewMode,languageId,themeDisplay)} 
85 
86                            <#else> 
87                                <p style="display:none">No se ha recuperado ningún artículo con el id [${articleConnection.secondaryId}]</p> 
88                            </#if> 
89                        </#list> 
90                    </#if> 
91                     
92                <#else> 
93                    <p style="display:none">Problema al recuperar el artículo del grupo [${groupIdLong}], con articleId [${articleId}]</p> 
94                </#if> 
95			 
96					 
97				 
98                <#assign idUsuario = getterUtil.getLong(themeDisplay.getUserId())> 
99                <#if (idUsuario gt 0)> 
100                        <#assign user = userService.getUserById(getterUtil.getLong(themeDisplay.getUserId()))> 
101                </#if> 
102		    </div>  
103		</div> 
104		<div class="recomanacio_detall"> 
105			${recomendationText.getData()} 
106		</div> 
107		<#if (article!="")> 
108            <#assign dataMod=article.getModifiedDate()> 
109			<span class="modificationDate">${dataMod?string["dd/MM/yyyy"]}</span> 
110		</#if> 
111	</div>  
112<#else> 
113 
114	<div class="recommendationDetail"> 
115		<div class="recommendationData"> 
116			<div class="recommendationValoraciones">																							 
117            <#assign articleClass = classNameSvc.getClassName("com.liferay.journal.model.JournalArticle")> 
118            <#assign articleId = id> 
119            <#assign groupIdLong = getterUtil.getLong(groupId)> 
120            <#assign article = articleSvc.getArticle(groupIdLong, articleId)> 
121            <!--##Corrección 6.1: caso en el que el article pertenece a Global--> 
122            <#if (validator.isNotNull(article) && article!="" )> 
123                 
124                <#assign groupIdLong = getterUtil.getLong(groupSvc.getCompanyGroup(companyId).getGroupId())> 
125                <#assign article = articleSvc.getArticle(groupIdLong, articleId)> 
126            </#if> 
127            <!--##Fin corrección 6.1--> 
128            <#if (article!="")>                 
129                <#assign assetEntry = assetEntrySvc.fetchEntry(articleClass.getClassName(), article.getResourcePrimKey())> 
130                <#assign assetEntryId = assetEntry.getEntryId()> 
131                <#assign assetEntryIdLong = getterUtil.getLong(assetEntryId)> 
132                 
133                 
134                    <#assign assetLinks = assetLinkSvc.getDirectLinks(assetEntryIdLong)> 
135                    <#if assetLinks?has_content> 
136                        <#list assetLinks as assetLink> 
137                            <#if (getterUtil.getLong(assetLink.getEntryId1()) == assetEntryIdLong)> 
138                                <#assign assetLinkEntry = assetEntrySvc.getEntry(getterUtil.getLong(assetLink.getEntryId2()))> 
139                            <#else> 
140                                <#assign assetLinkEntry = assetEntrySvc.getEntry(getterUtil.getLong(assetLink.getEntryId1()))> 
141                            </#if> 
142                            <#assign classPK = assetLinkEntry.getClassPK()> 
143                            <#assign relatedArticle = articleSvc.getLatestArticle(getterUtil.getLong(classPK))> 
144                            <#if (relatedArticle)> 
145                                <#assign relatedStructureId = relatedArticle.structureId> 
146                                <#if (relatedStructureId == "DOCUMENT_RECOMANAT" )> 
147                                    <#assign relatedArticleTemplateId = "RECOMANACIÓ_" + relatedStructureId> 
148                                <#else> 
149                                    <#assign relatedArticleTemplateId = "RECOMANACIÓ_ALTRE"> 
150                                </#if> 
151                                <#assign languageId = localeUtil.toLanguageId(locale)> 
152                                <#if image.getData()?has_content && image.getData()?length != 0> 
153                                	<#assign imgSrc = image.getData()> 
154                                <#else> 
155                                	<#assign imgSrc = image.urlExterna.getData()> 
156                                </#if> 
157                                <#if (imgSrc!="")> 
158                                    <p class="img"><img src="${imgSrc}" alt="${title.getData()}" /></p> 
159                                </#if> 
160                                ${journalContentUtil.getContent(groupIdLong,relatedArticle.articleId,relatedArticleTemplateId,viewMode,languageId,themeDisplay)}                                                     
161                            <#else> 
162                                <p style="display:none">No se ha recuperado ningún artículo con el id [${articleConnection.secondaryId}]</p> 
163                            </#if> 
164                        </#list> 
165                    </#if> 
166                 
167            <#else> 
168                <p style="display:none">Problema al recuperar el artículo del grupo [$groupIdLong], con articleId [$articleId]</p> 
169            </#if> 
170	       <#assign idUsuario = getterUtil.getLong(themeDisplay.getUserId())> 
171	       <#if (idUsuario gt 0)> 
172	         
173	        <#assign user =userService.getUserById(getterUtil.getLong(themeDisplay.getUserId()))> 
174	       </#if> 
175			</div> <!--## .recommendationValoraciones--> 
176			<div class="valoraciones"> 
177            <!--##AddThis Button BEGIN--> 
178            <#assign titolRecomanacio=languageUtil.get(locale, title.getData())> 
179            <#if (relatedArticle="")> 
180            <#assign titolRecomanacio=languageUtil.get(locale, relatedArticle.title.data)> 
181            </#if> 
182		<div class="addthis_toolbox addthis_20x20_style" addthis:url="https://bibliotecavirtual.diba.cat/detall-recomanacio/-/cotingut/$groupId/RECOMANACIO_DETALL/${urltitle}" 
183	                               addthis:title="${titolRecomanacio}"> 
184		        <a class="addthis_button_email" style="height:25px"></a> 
185			<a class="addthis_button_print" style="height:25px"></a> 
186	        	<#if (!validator.equals(themeDisplay.getScopeGroupId(), geniusGroupId))> 
187				<a class="addthis_button_google_plusone" g:plusone:size="medium"></a> <br> 
188				<a class="addthis_button_twitter"></a>  
189				<a class="addthis_counter_facebook"></a> 
190	        	</#if> 
191		</div> 
192<script type="text/javascript" src="http://s7.addthis.com/js/300/addthis_widget.js#pubid=ra-515e9ed80cb968d8"></script> 
193<!--##AddThis Button END --> 
194	            <#if (validator.isNotNull(user) && !user.isDefaultUser()) > 
195					<form name="fmGuardarRecomendacion${id}" action="" method="post"> 
196						   <input type="button" class="botoDesar" name="save" value="Desa" onclick="javascript:saveEntryAction("fmGuardarRecomendacion${id}");"/> 
197					</form> 
198				</#if> 
199			</div> <!--## .valoraciones--> 
200		</div> <!--## .recomendationData--> 
201		<div class="recomanacio_detall"> 
202			${recomendationText.getData()} 
203		</div> 
204		<#if (article="")> 
205            <#assign dataMod=article.getModifiedDate()> 
206			<span class="modificationDate">${dataMod?string["dd/MM/yyyy"]}</span> 
207		</#if> 
208	</div> <!--## .recomendationDetail vamo2--> 
209 
210</#if>