NullPointerException in UIUserToolBarDashboardPortlet.gtmpl if no navigation.xml created
for a LDAP user
--------------------------------------------------------------------------------------------------------
Key: GTNPORTAL-1596
URL:
https://jira.jboss.org/browse/GTNPORTAL-1596
Project: GateIn Portal
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 3.0.0-GA
Reporter: Gary Hu
If there's no navigation.xml created for a LDAP user, NullPointerException is thrown
from UIUserToolBarDashboardPortlet.gtmpl:
ERROR [org.exoplatform.webui.application.portlet.PortletApplicationController]
(ajp-0.0.0.0-10209-1) Error while rendering the porlet
org.exoplatform.groovyscript.TemplateRuntimeException: Groovy template exception at
DataText[pos=Position[col=1,line=94],data= if(currentUserNavigation.getNodes() ==null ||
currentUserNavigation.getNodes().size() < 1){ ] for template
app:/groovy/admintoolbar/webui/component/UIUserToolBarDashboardPortlet.gtmpl
at org.exoplatform.groovyscript.GroovyScript.buildRuntimeException(GroovyScript.java:162)
at org.exoplatform.groovyscript.GroovyScript.render(GroovyScript.java:105)
at org.exoplatform.groovyscript.GroovyTemplate.render(GroovyTemplate.java:112)
at org.exoplatform.groovyscript.text.TemplateService.merge(TemplateService.java:117)
at org.exoplatform.webui.core.lifecycle.Lifecycle.renderTemplate(Lifecycle.java:132)
at org.exoplatform.webui.core.lifecycle.Lifecycle.processRender(Lifecycle.java:85)
at
org.exoplatform.webui.core.lifecycle.UIApplicationLifecycle.processRender(UIApplicationLifecycle.java:66)
at org.exoplatform.webui.core.UIComponent.processRender(UIComponent.java:148)
at
org.exoplatform.webui.core.UIPortletApplication.processRender(UIPortletApplication.java:103)
at
org.exoplatform.webui.application.portlet.PortletApplication.render(PortletApplication.java:254)
at
org.exoplatform.webui.application.portlet.PortletApplicationController.render(PortletApplicationController.java:110)
....
This could be fixed changing the following code in UIUserToolBarDashboardPortlet.gtmpl:
if(currentUserNavigation.getNodes() ==null || currentUserNavigation.getNodes().size()
< 1){
to
if(currentUserNavigation==null || currentUserNavigation.getNodes() ==null ||
currentUserNavigation.getNodes().size() < 1){
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira