ICEfaces
  1. ICEfaces
  2. ICE-2190

NPE in ExternalContext.isUserInRole() on WebLogic 9.2

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6.1
    • Fix Version/s: 1.6.2
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      solaris
      WebLogic Server 9.2 MP2 running Jrockit 1.5.0_11

      Description


      2007-08-07 16:11:42,134 ERROR (ApplyRequestValuesPhase.java:104) - java.lang.NullPointerException
      javax.faces.el.EvaluationException: java.lang.NullPointerException
      at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:150)
      at javax.faces.component.UICommand.broadcast(UICommand.java:325)
      at com.icesoft.faces.component.panelseries.UISeries$RowEvent.broadcast(UISeries.java:524)
      at com.icesoft.faces.component.panelseries.UISeries.broadcast(UISeries.java:232)
      at javax.faces.component.UIData.broadcast(UIData.java:677)
      at com.icesoft.faces.component.panelseries.UISeries.broadcast(UISeries.java:227)
      at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:287)
      at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:327)
      at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:99)
      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:268)
      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
      at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.renderCycle(ReceiveSendUpdates.java:57)
      at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.service(ReceiveSendUpdates.java:45)
      at com.icesoft.faces.webapp.http.core.IDVerifier.service(IDVerifier.java:25)
      at com.icesoft.faces.webapp.http.servlet.BasicAdaptingServlet.service(BasicAdaptingServlet.java:16)
      at com.icesoft.faces.webapp.http.servlet.ViewBoundAdaptingServlet.service(ViewBoundAdaptingServlet.java:44)
      at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
      at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
      at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:97)
      at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:35)
      at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
      at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
      at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:85)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:223)
      at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
      at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:500)
      at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:245)
      at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:54)
      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:223)
      at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
      at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
      at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:172)
      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
      at com.middleware.filters.AppControlFilter.doFilter(AppControlFilter.java:125)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3243)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
      at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2003)
      at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1909)
      at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1357)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
      Caused by: java.lang.NullPointerException
      at weblogic.servlet.internal.ServletRequestImpl.isUserInRole(ServletRequestImpl.java:888)
      at com.icesoft.faces.env.ServletEnvironmentRequest.isUserInRole(ServletEnvironmentRequest.java:221)
      at com.icesoft.faces.webapp.http.servlet.ServletExternalContext.isUserInRole(ServletExternalContext.java:375)
      at com.isepp.controller.utils.PersonPermissionUtil.isAdmin(PersonPermissionUtil.java:33)
      at com.isepp.controller.beans.funding.FundingScenarioTaskBean.<init>(FundingScenarioTaskBean.java:50)
      at com.isepp.controller.beans.funding.FundingScenarioSourceBean.expandAction(FundingScenarioSourceBean.java:149)
      at com.isepp.controller.beans.funding.FundingScenarioSourceBean.toggleSubGroupAction(FundingScenarioSourceBean.java:91)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:146)
      at javax.faces.component.UICommand.broadcast(UICommand.java:325)
      at com.icesoft.faces.component.panelseries.UISeries$RowEvent.broadcast(UISeries.java:524)
      at com.icesoft.faces.component.panelseries.UISeries.broadcast(UISeries.java:232)
      at javax.faces.component.UIData.broadcast(UIData.java:677)
      at com.icesoft.faces.component.panelseries.UISeries.broadcast(UISeries.java:227)
      at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:287)
      at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:327)
      at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:99)
      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:268)
      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
      at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.renderCycle(ReceiveSendUpdates.java:57)
      at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.service(ReceiveSendUpdates.java:45)
      at com.icesoft.faces.webapp.http.core.IDVerifier.service(IDVerifier.java:25)
      at com.icesoft.faces.webapp.http.servlet.BasicAdaptingServlet.service(BasicAdaptingServlet.java:16)
      at com.icesoft.faces.webapp.http.servlet.ViewBoundAdaptingServlet.service(ViewBoundAdaptingServlet.java:44)
      at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
      at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
      at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:97)

        Activity

        Hide
        Antony Saba added a comment -

        This is the simplest app I could make that exhibits the issue. To use, some kind of authentication has to be configured in WebLogic and usernames added to the weblogic.xml included in the app.

        Show
        Antony Saba added a comment - This is the simplest app I could make that exhibits the issue. To use, some kind of authentication has to be configured in WebLogic and usernames added to the weblogic.xml included in the app.
        Hide
        Antony Saba added a comment -

        Also, I have reproduced this locally on a Windows Machine with MP1 and JRockit, but it is more intermittent than in the clustered configuration. This seem to do it most of the time:

        1. Start with all browser windows closed.
        2. Open the test app at localhost/ICE-2190
        3. Open another window (or tab, same behavior happens on IE and Firefox) and log in to the WLS console using the admin account.
        4. Click on the "Update" button in the test app.

        It seems like depending on the timing of the above, one of three things happens:

        • No problems.
        • an NPE on every other click of the button
        • an NPE on every click of the button
        Show
        Antony Saba added a comment - Also, I have reproduced this locally on a Windows Machine with MP1 and JRockit, but it is more intermittent than in the clustered configuration. This seem to do it most of the time: 1. Start with all browser windows closed. 2. Open the test app at localhost/ ICE-2190 3. Open another window (or tab, same behavior happens on IE and Firefox) and log in to the WLS console using the admin account. 4. Click on the "Update" button in the test app. It seems like depending on the timing of the above, one of three things happens: No problems. an NPE on every other click of the button an NPE on every click of the button
        Hide
        Ken Fyten added a comment -

        Please try to reproduce using the attached test app.

        Show
        Ken Fyten added a comment - Please try to reproduce using the attached test app.
        Hide
        Sam Xiao added a comment -

        The problem no longer presents in Icefaces 1.6.2

        Show
        Sam Xiao added a comment - The problem no longer presents in Icefaces 1.6.2
        Hide
        Sam Xiao added a comment -

        more test found out that clean up the session triggers the problem

        Show
        Sam Xiao added a comment - more test found out that clean up the session triggers the problem
        Hide
        Sam Xiao added a comment -

        The problem seems random and I cannot reproduce it after the first time. So it doesn't present itself under any situation.

        Show
        Sam Xiao added a comment - The problem seems random and I cannot reproduce it after the first time. So it doesn't present itself under any situation.

          People

          • Assignee:
            Sam Xiao
            Reporter:
            Philip Breau
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: