5 Replies Latest reply on Oct 27, 2006 6:18 PM by Pete Muir

    EL embedded in message bundles broken in 1.1?

    ryan dewell Novice

      Pretty smooth upgrade to 1.1 overall. Still on 4.0.4 + myfaces 1.1.4.

      Running into a problem with EL embedded in messages. This worked fine in 1.0.1:

      Messages in the bundle are:

      C.Icon.Yellow.BGBottom=239,223,56
      C.TransactionLifecycle.Completion.Icon.BGBottom=#{messages['C.Icon.Yellow.BGBottom']}
      


      This was working on same jboss + my faces in 1.0.1, but is broken in 1.1. Not sure if this is a usage problem on my part that is now broken, or something with seam. Anyway, here's the trace when this is evaluated:

      Ideas on what changed?

      12:27:20,775 WARN [Interpolator] exception interpolating string: #{messages['C.Icon.Yellow.BGBottom']}
      javax.faces.el.ReferenceSyntaxException: Invalid expression: '${messages.'C.Icon.Yellow.BGBottom'}'
       at org.apache.myfaces.el.ELParserHelper.parseExpression(ELParserHelper.java:97)
       at org.apache.myfaces.el.ValueBindingImpl$2.newInstance(ValueBindingImpl.java:82)
       at org.apache.myfaces.shared_impl.util.BiLevelCacheMap.get(BiLevelCacheMap.java:123)
       at org.apache.myfaces.el.ValueBindingImpl.<init>(ValueBindingImpl.java:115)
       at org.apache.myfaces.application.ApplicationImpl$1.newInstance(ApplicationImpl.java:64)
       at org.apache.myfaces.shared_impl.util.BiLevelCacheMap.get(BiLevelCacheMap.java:123)
       at org.apache.myfaces.application.ApplicationImpl.createValueBinding(ApplicationImpl.java:617)
       at org.jboss.seam.actionparam.ActionParamValueBinding.setBinding(ActionParamValueBinding.java:68)
       at org.jboss.seam.actionparam.ActionParamValueBinding.<init>(ActionParamValueBinding.java:62)
       at org.jboss.seam.jsf.SeamApplication11.createValueBinding(SeamApplication11.java:109)
       at org.jboss.seam.core.Expressions$1.getFacesValueBinding(Expressions.java:66)
       at org.jboss.seam.core.Expressions$1.getValue(Expressions.java:49)
       at org.jboss.seam.core.Interpolator.interpolateExpressions(Interpolator.java:83)
       at org.jboss.seam.core.Interpolator.interpolate(Interpolator.java:58)
       at org.jboss.seam.core.Messages$1.get(Messages.java:67)
       at org.jboss.seam.core.Messages$1.get(Messages.java:82)
      
      .....
      
      Caused by: org.apache.commons.el.parser.ParseException: Encountered "\'C.Icon.Yellow.BGBottom\'" at line 1, column 12.
      Was expecting:
       <IDENTIFIER> ...
      






        • 1. Re: EL embedded in message bundles broken in 1.1?
          Pete Muir Master

          I'm seeing a similar problem in a Facelets ComponentHandler using Seam 1.1BETA1

          ...
          protected void setAttributes(FaceletContext ctx, Object instance) {
           super.setAttributes(ctx, instance);
           ctx.getFacesContext.getApplication.createValueBinding("#{messages['my.key']}");
          ....
          }
          ...
          


          javax.faces.el.ReferenceSyntaxException: Invalid expression: '${messages.'my.key'}'
           at org.apache.myfaces.el.ELParserHelper.parseExpression(ELParserHelper.java:97)
           at org.apache.myfaces.el.ValueBindingImpl$2.newInstance(ValueBindingImpl.java:82)
           at org.apache.myfaces.shared_impl.util.BiLevelCacheMap.get(BiLevelCacheMap.java:123)
           at org.apache.myfaces.el.ValueBindingImpl.<init>(ValueBindingImpl.java:115)
           at org.apache.myfaces.application.ApplicationImpl$1.newInstance(ApplicationImpl.java:64)
           at org.apache.myfaces.shared_impl.util.BiLevelCacheMap.get(BiLevelCacheMap.java:123)
           at org.apache.myfaces.application.ApplicationImpl.createValueBinding(ApplicationImpl.java:617)
           at org.jboss.seam.actionparam.ActionParamValueBinding.setBinding(ActionParamValueBinding.java:68)
           at org.jboss.seam.actionparam.ActionParamValueBinding.<init>(ActionParamValueBinding.java:62)
           at org.jboss.seam.jsf.SeamApplication11.createValueBinding(SeamApplication11.java:109)
           at uk.co.splendid.jsf.trinidad.TrinidadExtensionComponentHandler.setAttributes(TrinidadExtensionComponentHandler.java:37)
           at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:140)
           at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
           at com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:295)
           at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:165)
           at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
           at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:119)
           at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
           at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
           at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:248)
           at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:294)
           at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:273)
           at com.sun.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:143)
           at com.sun.facelets.tag.ui.DecorateHandler.apply(DecorateHandler.java:105)
           at com.sun.facelets.tag.ui.DefineHandler.apply(DefineHandler.java:58)
           at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:128)
           at com.sun.facelets.impl.DefaultFaceletContext$TemplateManager.apply(DefaultFaceletContext.java:306)
           at com.sun.facelets.impl.DefaultFaceletContext.includeDefinition(DefaultFaceletContext.java:279)
           at com.sun.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:68)
           at com.sun.facelets.tag.ui.DefineHandler.apply(DefineHandler.java:58)
           at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:128)
           at com.sun.facelets.impl.DefaultFaceletContext$TemplateManager.apply(DefaultFaceletContext.java:306)
           at com.sun.facelets.impl.DefaultFaceletContext.includeDefinition(DefaultFaceletContext.java:279)
           at com.sun.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:68)
           at com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:295)
           at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:165)
           at com.sun.facelets.tag.ui.DefineHandler.apply(DefineHandler.java:58)
           at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:128)
           at com.sun.facelets.impl.DefaultFaceletContext$TemplateManager.apply(DefaultFaceletContext.java:306)
           at com.sun.facelets.impl.DefaultFaceletContext.includeDefinition(DefaultFaceletContext.java:279)
           at com.sun.facelets.tag.ui.InsertHandler.apply(InsertHandler.java:68)
           at com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:295)
           at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:165)
           at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
           at com.sun.facelets.tag.jsf.ComponentHandler.applyNextHandler(ComponentHandler.java:295)
           at com.sun.facelets.tag.jsf.ComponentHandler.apply(ComponentHandler.java:165)
           at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
           at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:119)
           at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
           at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
           at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:248)
           at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:294)
           at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:273)
           at com.sun.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:143)
           at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:113)
           at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
           at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
           at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:248)
           at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:294)
           at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:273)
           at com.sun.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:143)
           at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:113)
           at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
           at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
           at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:248)
           at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:294)
           at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:273)
           at com.sun.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:143)
           at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:113)
           at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
           at com.sun.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:25)
           at com.sun.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:95)
           at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:510)
           at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:553)
           at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:178)
           at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:327)
           at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:291)
           at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:214)
           at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:90)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:45)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:32)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
           at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
          
          21:57:10,015 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j
          ava: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.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
           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(Unknown Source)
          Caused by: org.apache.commons.el.parser.ParseException: Encountered "\'my.key\'" at line 1, column
          12.
          Was expecting:
           <IDENTIFIER> ...
          
           at org.apache.commons.el.parser.ELParser.generateParseException(ELParser.java:1895)
           at org.apache.commons.el.parser.ELParser.jj_consume_token(ELParser.java:1779)
           at org.apache.commons.el.parser.ELParser.Identifier(ELParser.java:872)
           at org.apache.commons.el.parser.ELParser.PropertySuffix(ELParser.java:783)
           at org.apache.commons.el.parser.ELParser.ValueSuffix(ELParser.java:765)
           at org.apache.commons.el.parser.ELParser.Value(ELParser.java:655)
           at org.apache.commons.el.parser.ELParser.UnaryExpression(ELParser.java:626)
           at org.apache.commons.el.parser.ELParser.MultiplyExpression(ELParser.java:479)
           at org.apache.commons.el.parser.ELParser.AddExpression(ELParser.java:428)
           at org.apache.commons.el.parser.ELParser.RelationalExpression(ELParser.java:315)
           at org.apache.commons.el.parser.ELParser.EqualityExpression(ELParser.java:238)
           at org.apache.commons.el.parser.ELParser.AndExpression(ELParser.java:188)
           at org.apache.commons.el.parser.ELParser.OrExpression(ELParser.java:138)
           at org.apache.commons.el.parser.ELParser.Expression(ELParser.java:120)
           at org.apache.commons.el.parser.ELParser.AttrValueExpression(ELParser.java:96)
           at org.apache.commons.el.parser.ELParser.ExpressionString(ELParser.java:43)
           at org.apache.myfaces.el.ELParserHelper.parseExpression(ELParserHelper.java:80)
           ... 108 more


          • 2. Re: EL embedded in message bundles broken in 1.1?
            Gavin King Master

            Hah, OK, this is a bug in the new EL extension stuff that Stan worked on I guess.

            • 4. Re: EL embedded in message bundles broken in 1.1?
              Stan Silvert Master

              I committed a change to SeamApplication11.java. This should fix the problem but I have no easy way to test it. Can one of you guys try it out for me?

              Thanks,

              Stan

              • 5. Re: EL embedded in message bundles broken in 1.1?
                Pete Muir Master

                Thats working for me now. Thanks Stan.