Bug 793498 (JBEPP-579)

Summary: NullPointerException in UIUserToolBarDashboardPortlet.gtmpl if no navigation.xml created for a LDAP user
Product: [JBoss] JBoss Enterprise Portal Platform 5 Reporter: Gary Hu <garyhu2>
Component: unspecifiedAssignee: Default User <jbpapp-maint>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 5.0.0.GACC: cjlyons, epp-bugs
Target Milestone: ---   
Target Release: 5.1.0.ER04   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/JBEPP-579
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-11-09 08:34:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Gary Hu 2010-10-25 20:34:48 UTC
Help Desk Ticket Reference: https://c.na7.visual.force.com/apex/Case_View?id=500A00000044Cvf&sfdc.override=1
project_key: JBEPP

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){

Comment 1 Gary Hu 2010-10-25 20:35:29 UTC
Link: Added: This issue depends GTNPORTAL-1596


Comment 2 Scott Mumford 2010-11-01 04:06:23 UTC
The Proposed Release Note text above needs to be verified when this JIRA is closed.

Comment 3 Scott Mumford 2010-11-01 04:06:23 UTC
Release Notes Docs Status: Added: Not Yet Documented
Release Notes Text: Added: Proposed Release Note text:
A NullPointerException would be encountered if no navigation.xml had been created for an LDAP user. A change to code in UIUserToolBarDashboardPortlet.gtmpl has corrected this issue by including a clause for this circumstance.


Comment 4 Scott Mumford 2010-11-03 06:17:22 UTC
Release Notes Docs Status: Removed: Not Yet Documented Added: Documented as Resolved Issue


Comment 5 Scott Mumford 2010-11-08 08:25:04 UTC
Release Notes Docs Status: Removed: Documented as Resolved Issue Added: Documented as Known Issue
Release Notes Text: Removed: Proposed Release Note text:
A NullPointerException would be encountered if no navigation.xml had been created for an LDAP user. A change to code in UIUserToolBarDashboardPortlet.gtmpl has corrected this issue by including a clause for this circumstance. Added: A NullPointerException is encountered if no navigation.xml has been created for an LDAP user. 


Comment 6 Thomas Heute 2010-11-09 08:34:31 UTC
Release Notes Docs Status: Removed: Documented as Known Issue Added: Documented as Resolved Issue


Comment 7 Scott Mumford 2010-11-10 00:36:31 UTC
Release Notes Text: Removed: A NullPointerException is encountered if no navigation.xml has been created for an LDAP user.  Added: In previous releases, a NullPointerException would be encountered if no navigation.xml had been created for an LDAP user.
A change to code in UIUserToolBarDashboardPortlet.gtmpl has corrected this issue by including a clause for this circumstance.