Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 1.8.1
-
Component/s: ICE-Components
-
Labels:None
-
Environment:WebSphere 6.1, IE7, WinXP
Description
When accessing a page that has a component that uses the renderedOnUserRole a NullPointerException is thrown. This happens only on the initial access of the page, if the page is refreshed after the exception the app functions normally. Also it doesn't seem to matter if the user logs in as a user name with security clearance or not. If the renderedOnUserRole attribute is removed this exception does not occur.
Exception:
Caused by: java.lang.NullPointerException
at java.util.ArrayList.<init>(ArrayList.java:158)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.inRole(SessionDispatcher.java:148)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.access$300(SessionDispatcher.java:29)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher$2.isUserInRole(SessionDispatcher.java:98)
at com.icesoft.faces.context.BridgeExternalContext.isUserInRole(BridgeExternalContext.java:215)
at com.icesoft.faces.component.ext.taglib.Util.isRenderedOnUserRole(Util.java:112)
at com.icesoft.faces.component.ext.HtmlOutputText.isRendered(HtmlOutputText.java:617)
at com.icesoft.faces.renderkit.dom_html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:95)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:721)
at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:358)
at com.icesoft.faces.renderkit.dom_html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:96)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:721)
at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:358)
at com.icesoft.faces.renderkit.dom_html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:96)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:721)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:517)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:522)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:522)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:522)
at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:282)
... 53 more
Exception:
Caused by: java.lang.NullPointerException
at java.util.ArrayList.<init>(ArrayList.java:158)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.inRole(SessionDispatcher.java:148)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.access$300(SessionDispatcher.java:29)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher$2.isUserInRole(SessionDispatcher.java:98)
at com.icesoft.faces.context.BridgeExternalContext.isUserInRole(BridgeExternalContext.java:215)
at com.icesoft.faces.component.ext.taglib.Util.isRenderedOnUserRole(Util.java:112)
at com.icesoft.faces.component.ext.HtmlOutputText.isRendered(HtmlOutputText.java:617)
at com.icesoft.faces.renderkit.dom_html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:95)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:721)
at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:358)
at com.icesoft.faces.renderkit.dom_html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:96)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:721)
at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:358)
at com.icesoft.faces.renderkit.dom_html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:96)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:721)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:517)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:522)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:522)
at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:522)
at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:282)
... 53 more
Activity
Ken Fyten
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |
Assignee Priority | P2 |
Ken Fyten
made changes -
Fix Version/s | 1.8.2-RC1 [ 10210 ] |
Mark Collette
made changes -
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #19176 | Wed Aug 19 18:23:36 MDT 2009 | mark.collette | |
Files Changed | ||||
MODIFY
/icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/servlet/SessionDispatcher.java
|
Ken Fyten
made changes -
Fix Version/s | 1.8.2 [ 10190 ] | |
Assignee Priority | P2 | |
Assignee | Ken Fyten [ ken.fyten ] | Mark Collette [ mark.collette ] |
Arran Mccullough
made changes -
Assignee | Ken Fyten [ ken.fyten ] |
Arran Mccullough
made changes -
Attachment | FullStackTrace.txt [ 11925 ] |
Arran Mccullough
made changes -
Environment | WebSphere 6.1, IE7 | WebSphere 6.1, IE7, WinXP |
Arran Mccullough
made changes -
Summary | Null Pointer Exception when accessing page with renderedOnUserRole on first access | Null Pointer Exception when accessing page with renderedOnUserRole on initial access |
Arran Mccullough
made changes -
Field | Original Value | New Value |
---|---|---|
Salesforce Case | [50070000009LNEH] |
Arran Mccullough
created issue -
I investigated the SessionDispatcher class' inRole method and found the likely NPE source, and came up with a fix. Then I noticed that this JIRA was linked to a duplicate, which recommended a very similar fix.
Subversion 19176
icefaces\core\src\com\icesoft\faces\webapp\http\servlet\SessionDispatcher.java