Bug 793498 (JBEPP-579) - NullPointerException in UIUserToolBarDashboardPortlet.gtmpl if no navigation.xml created for a LDAP user
Summary: NullPointerException in UIUserToolBarDashboardPortlet.gtmpl if no navigation....
Keywords:
Status: CLOSED NEXTRELEASE
Alias: JBEPP-579
Product: JBoss Enterprise Portal Platform 5
Classification: JBoss
Component: unspecified
Version: 5.0.0.GA
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 5.1.0.ER04
Assignee: Default User
QA Contact:
URL: http://jira.jboss.org/jira/browse/JBE...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-10-25 20:34 UTC by Gary Hu
Modified: 2012-02-28 16:38 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-11-09 08:34:31 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker JBEPP-579 0 None None None Never

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. 



Note You need to log in before you can comment on or make changes to this bug.