ICEfaces
  1. ICEfaces
  2. ICE-1455

NullPointerException - Remember Me / Identity Exception

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.5.3
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      windows xp, jrockit - BEA JRockit(R) (build R27.1.0-109-73164-1.5.0_08-20061129-1428-windows-ia32, compiled mode), seam 1.2, icefaces 1.5.3, mozzile/ie tested

      Description

      We use the following xml in our pages.xml to restrict access to part of our app. Since we started using icefaces 1.5.3, we are only able to log in 1 time. A subsequent logout/timeout and another log in generates the exception below....

      pages.xml

          <page view-id="/secure/*">
      <restrict>#{identity.loggedIn}</restrict>
              <navigation from-action="#{identity.logout}">
                  <redirect view-id="/login.xhtml"/>
              </navigation>
          </page>

      components.xml

      <security:identity authenticate-method="#{authenticator.authenticate}" remember-me="true" />

      Exception

      13:23:55,065 ERROR [Log4JLogger.error:119] Servlet.service() for servlet Blocking Servlet threw exception
      javax.faces.FacesException: Error calling action method of component with id _id6:_id31
              at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
              at javax.faces.component.UICommand.broadcast(UICommand.java:109)
              at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
              at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:171)
              at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
              at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
              at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
              at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.renderCycle(BlockingServlet.java:456)
              at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.receiveUpdates(BlockingServlet.java:444)
              at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.executeRequest(BlockingServlet.java:314)
              at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:186)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
              at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
              at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
              at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
              at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
              at java.lang.Thread.run(Thread.java:595)
      Caused by: javax.faces.el.EvaluationException: /login.xhtml @33,97 action="#{identity.login}": java.lang.NullPointerException:
              at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:73)
              at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:61)
              ... 30 more
      Caused by: java.lang.NullPointerException:
              at org.jboss.seam.core.Selector.setCookieValue(Selector.java:77)
              at org.jboss.seam.security.Identity.postAuthenticate(Identity.java:234)
              at org.jboss.seam.security.Identity.authenticate(Identity.java:207)
              at org.jboss.seam.security.Identity.authenticate(Identity.java:199)
              at org.jboss.seam.security.Identity.login(Identity.java:184)
              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.el.parser.AstValue.invoke(AstValue.java:130)
              at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:274)
              at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
              at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69)
              at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:61)
              at javax.faces.component.UICommand.broadcast(UICommand.java:109)
              at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
              at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:171)
              at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
              at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
              at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
              at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.renderCycle(BlockingServlet.java:456)
              at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.receiveUpdates(BlockingServlet.java:444)
              at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.executeRequest(BlockingServlet.java:314)
              at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:186)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
              at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)

        Activity

        Hide
        Olivier Huin added a comment -

        Hi,
        I have the same problem using seam-gen for icefaces. I can't log in at all.
        Does this icefaces seam-gen really works ? I assume it does. But I can't make it work on my JBoss 4.0.5. Are there any jboss configuration files to set up ? Is there anything needed on the JBOSS side to activate JAAS...?

        Looking a bit further into the matter, it seems that the following is happening:
        During the Identity.postAuthenticate, seam/icefaces tries to write a cookie but can't find the response. Indeed
        FacesContext.getCurrentInstance().getExternalContext().getResponse()) returns null. For info, FacesContext.getCurrentInstance().getExternalContext() contains an instance. Is there anything special to do to make sure that there is a response instance in the external context ?

        I suspect I am missing something in one of the configuration files.. any clue ?
        Best,
        Olivier

        Show
        Olivier Huin added a comment - Hi, I have the same problem using seam-gen for icefaces. I can't log in at all. Does this icefaces seam-gen really works ? I assume it does. But I can't make it work on my JBoss 4.0.5. Are there any jboss configuration files to set up ? Is there anything needed on the JBOSS side to activate JAAS...? Looking a bit further into the matter, it seems that the following is happening: During the Identity.postAuthenticate, seam/icefaces tries to write a cookie but can't find the response. Indeed FacesContext.getCurrentInstance().getExternalContext().getResponse()) returns null. For info, FacesContext.getCurrentInstance().getExternalContext() contains an instance. Is there anything special to do to make sure that there is a response instance in the external context ? I suspect I am missing something in one of the configuration files.. any clue ? Best, Olivier
        Hide
        Judy Guglielmin added a comment -

        This one just timed out. There are no further problems with current Seam and ICEfaces integration.

        Show
        Judy Guglielmin added a comment - This one just timed out. There are no further problems with current Seam and ICEfaces integration.

          People

          • Assignee:
            Unassigned
            Reporter:
            Jay Scherer
          • Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: