6 Replies Latest reply on Oct 29, 2008 3:27 PM by David Spindle

    No facesContext present on session-startup in SeamTest

    Tobias Hill Newbie

      Probably a bug:

      We have a bean which is created when the session starts. It uses #{facesContext.externalContext.request} (aliased as httpServletRequest below) in the method annotated with @Create. This httpServletRequest is being injected fine when deployed in regular JBoss. When running SeamTest and embedded JBoss however the injected value is null ... as a consequence of facesContext being null when the session starts.

      In other words:

      public class SessionInitedBean implements Serializable {
          private HttpServletRequest httpServletRequest;
          public void init() {
              boolean p = httpServletRequest != null;

      When In SeamTest p is false, while in ordinary JBoss p is true.

      Essentially this makes our whole SeamTest-suite non working at the moment ... since any call we make starts a new Session ... leading to a NPE in the Create-method of that particular bean.

      Could anyone from the seam-team comment on this ... whether this is known or if I should submit a JIRA?