0 Replies Latest reply on Feb 3, 2007 4:46 AM by nicolas duminil

    IllegalStateException: No application context active

    nicolas duminil Master

      Greetings,

      I'm trying to do a very simple Seam test in a JBoss Portal 2.4 and it fails. The JSF is very simple:

      <f:view>
      <h:form>
      <h:outputText value="A Test: "/>
      <h:outputText value="#{hotel.address}"/>
      </h:form>
      </f:view>

      The backing bean also:

      @Name("hotel")
      @Scope(CONVERSATION)
      @Stateful

      public class Hotel implements Serializable
      {
      private static final long serialVersionUID = 1881413500711441951L;
      private String address = "Trou Perdu";

      public String getAddress()
      {
      return address;
      }

      public void setAddress(String address)
      {
      this.address = address;
      }

      @Destroy @Remove
      public void destroy(){}
      }

      The JSF is exposed by a portlet. Running it in the portal sample project provided with Seam, as well as in a separate one, raises the following exception when the portlet is rendered:

      javax.faces.FacesException: org.apache.jasper.JasperException: Cannot get value for expression '#{hotel.address}'
      ...
      Caused by java.lang.IllegalStateException: No application context active.

      Many thanks in advance for any help.

      Kind regards,

      Nicolas