5 Replies Latest reply on Jun 3, 2019 3:26 AM by Sivaprasad Krishnaswamy

    Seam 2.3 mail and JSF 2.2

    Timothy Whitehead Newbie

      I recently upgraded my JBoss 7.1.1 to use JSF 2.2.1 so that I can use pass through attributes which I require for developing mobile sites with jquery mobile.

      However, this seems to have broken seams org.jboss.seam.faces.Renderer that is used for seam mail. Renderer.instance() returns null.

       

      Does anyone have any suggestions as to why this is happening and how I can resolve it?

        • 1. Re: Seam 2.3 mail and JSF 2.2
          Frank Bitzer Newbie

          I have a very similar problem; however I'm using MyFaces 2.1.13 instead of JSF 2.2.

           

          It seems like the Seam FaceletsRenderer has a class depenency to "com.sun.faces.facelets.Facelet" which does neither exist in JSF 2.2 nor in MyFaces. Because of this, the Renderer component doesn't even get instantiated.

           

          Any ideas how to fix this?

           

          Cheers
          Frank

          • 2. Re: Seam 2.3 mail and JSF 2.2
            Timothy Whitehead Newbie

            I used ideas from:

             

            http://stackoverflow.com/questions/20407151/seam-mail-with-jsf-2-myfaces

             

            and got it to work.

             

            I am attaching my modified files if anyone needs them.

            It works with Seam 2.3 and JSF 2.2.4

            1 of 1 people found this helpful
            • 3. Re: Seam 2.3 mail and JSF 2.2
              Leandro Silva Ferreira Newbie

              Hi Timothy, thanks for sharing your solution.

              Just one question: With this modified classes, I need to replace then in the JBoss Seam source and recompile JBoss Seam or you just use then inside your project ?

               

              Thanks.

              • 4. Re: Seam 2.3 mail and JSF 2.2
                Andre Such Newbie

                Thanks! You saved my day!

                • 5. Re: Seam 2.3 mail and JSF 2.2
                  Sivaprasad Krishnaswamy Master

                  Hello Timothy,

                  I saw your custom class.Its really good.

                   

                  But its not calling the proper way.

                   

                  Java class:

                   

                  @In(create=true)

                  private FaceletsRenderer faceletRenderer;

                   

                  faceletRenderer.render("/smallEmailNotification.xhtml");

                   

                  Throws error like below,

                   

                  Caused by: org.jboss.seam.RequiredException: @In attribute requires non-null value: manuelProcessor.faceletRenderer

                  at org.jboss.seam.Component.getValueToInject(Component.java:2400)

                  at org.jboss.seam.Component.injectAttributes(Component.java:1743)

                  at org.jboss.seam.Component.inject(Component.java:1561)

                  at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:63)

                  at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)

                  at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)

                  at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)

                  at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)

                  at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:196)

                  at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:114)

                  at com.bosch.wcms.ttthisnewsletter.ManuelProcessor_$$_javassist_seam_7.getIdmRole(ManuelProcessor_$$_javassist_seam_7.java)

                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                  at java.lang.reflect.Method.invoke(Method.java:498)

                  at javax.el.BeanELResolver.getValue(BeanELResolver.java:97)

                  at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)

                  at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)

                  at org.jboss.el.parser.AstPropertySuffix.getValue(AstPropertySuffix.java:53)

                  at org.jboss.el.parser.AstValue.getValue(AstValue.java:67)

                  at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)

                  at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)

                  at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194)

                  at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:182)

                  at javax.faces.component.UIOutput.getValue(UIOutput.java:174)

                  at javax.faces.component.UIInput.getValue(UIInput.java:291)

                  at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:205)

                  at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:355)

                  at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:164)

                  at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:920)

                  at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1863)

                  at javax.faces.render.Renderer.encodeChildren(Renderer.java:176)

                  at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:890)

                  at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:304)

                  at com.sun.faces.renderkit.html_basic.GridRenderer.renderRow(GridRenderer.java:185)

                  at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:129)

                  at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:890)

                  at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1856)

                  at org.richfaces.renderkit.RendererBase.renderChildren(RendererBase.java:282)

                  at org.richfaces.renderkit.html.PanelRenderer.doEncodeEnd(PanelRenderer.java:183)

                  at org.richfaces.renderkit.RendererBase.encodeEnd(RendererBase.java:180)

                  at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:920)

                  at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1863)

                  at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)

                  at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)

                  at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:458)

                  at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:134)

                  at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337)

                  at org.jboss.seam.jsf.SeamViewHandler.renderView(SeamViewHandler.java:188)

                  at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)

                  at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)

                  at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)

                  at javax.faces.webapp.FacesServlet.service(FacesServlet.java:659)

                  ... 36 more

                   

                  How to resolve it???

                   

                  Thank you,

                  Siva