2 Replies Latest reply on Jan 1, 2006 10:36 PM by Gavin King

    Problem with loadBundle

    nusa Novice

      Hi,

      I have my messages.properties file located under WEB-INF/classes. Then, in my jsp file I have this :

      <f:loadBundle basename="messages" var="msg"/>
      ...
      <h:outputText value="#{msg.BrowserTitle}" />
      ...
      

      The log says that the resource is loaded :
      ...
      23:20:41,758 DEBUG [org.jboss.seam.Component] instantiating Seam component: resourceBundle
      23:20:41,894 INFO [org.jboss.seam.core.ResourceBundle] loaded resource bundle: messages
      ...
      

      Even that the browser display correctly, but yet I got hte following error :
      ...
      23:21:08,720 DEBUG [org.jboss.seam.contexts.Lifecycle] <<< End web request
      23:21:08,726 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: msg
      23:21:08,744 ERROR [org.jboss.seam.servlet.SeamExceptionFilter] uncaught exception handled by Seam
      javax.servlet.ServletException: Cannot get value for expression '#{msg.BrowserTitle}'
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:121)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      ...
      

      Do you have the same problem ?
      I use the CVS version dated 2/3 days ago ( beta 2 ).

      Thanks for any help/comment/suggestions.

        • 1. Re: Problem with loadBundle
          nusa Novice

          Hi,

          Further down the log, I have this :

          23:43:15,930 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: msg
          23:43:15,931 ERROR [org.jboss.seam.servlet.SeamExceptionFilter] uncaught exception handled by Seam
          javax.servlet.ServletException: Cannot get value for expression '#{msg.BrowserTitle}'
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:121)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           ...
          23:43:15,932 DEBUG [org.jboss.seam.contexts.Lifecycle] After request, destroying contexts
          23:43:15,932 DEBUG [org.jboss.seam.contexts.Lifecycle] <<< End web request
          23:43:15,942 DEBUG [org.jboss.seam.util.NamingHelper] JNDI InitialContext properties:{}
          23:43:15,958 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/SeamADF].[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
          javax.faces.el.EvaluationException: Cannot get value for expression '#{msg.BrowserTitle}'
           at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:397)
           ...
          Caused by: java.lang.IllegalStateException: No active application scope
           at org.jboss.seam.core.Init.instance(Init.java:88)
           at org.jboss.seam.Component.getInstanceFromFactory(Component.java:1074)
           at org.jboss.seam.Component.getInstance(Component.java:1047)
           at org.jboss.seam.Component.getInstance(Component.java:1033)
           at org.jboss.seam.jsf.SeamVariableResolver.resolveVariable(SeamVariableResolver.java:43)
           at org.apache.myfaces.el.ValueBindingImpl$ELVariableResolver.resolveVariable(ValueBindingImpl.java:569)
           at org.apache.commons.el.NamedValue.evaluate(NamedValue.java:124)
           at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:140)
           at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:378)
          

          Anybody know what does it means by 'No active application scope' is ?

          Thanks.

          • 2. Re: Problem with loadBundle
            Gavin King Master

            It means there is no Seam context.


            Probably you are trying to hit the JSP directly, instead of going via the JSF servlet.