Uploaded image for project: 'Seam 2'
  1. Seam 2
  2. JBSEAM-3187

Sending asynchronous mail is not ok with jsf mojarra 1.2_08

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Out of Date
    • Affects Version/s: 2.0.2.SP1
    • Fix Version/s: 2.0.3.CR2, 2.1.0.BETA1
    • Component/s: Mail
    • Labels:
      None
    • Environment:

      jsf ri mojarra 1.2_08

      Description

      The bug is not present with jsf ri 1.2_04.
      With 1.2_08, when a parameter in the mail template is null - for example if #

      {test}

      returns null, there is an exception like this :

      java.lang.NullPointerException
      at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:80)
      at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
      at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
      at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
      at org.jboss.el.parser.AstValue.getValue(AstValue.java:63)
      at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
      at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
      at javax.faces.component.ValueBindingValueExpressionAdapter.getValue(ValueBindingValueExpressionAdapter.java:113)
      at org.jboss.seam.mail.ui.MailComponent.getValue(MailComponent.java:179)
      at org.jboss.seam.mail.ui.MailComponent.getString(MailComponent.java:158)
      at org.jboss.seam.mail.ui.AddressComponent.getAddress(AddressComponent.java:55)
      at org.jboss.seam.mail.ui.AddressComponent.getInternetAddress(AddressComponent.java:28)
      at org.jboss.seam.mail.ui.RecipientAddressComponent.encodeBegin(RecipientAddressComponent.java:25)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:934)
      at com.sun.facelets.component.RepeatRenderer.encodeChildren(RepeatRenderer.java:50)
      at com.sun.facelets.component.UIRepeat.process(UIRepeat.java:357)
      at com.sun.facelets.component.UIRepeat.encodeChildren(UIRepeat.java:617)
      at org.jboss.seam.ui.util.cdk.RendererBase.renderChild(RendererBase.java:186)
      at org.jboss.seam.ui.util.cdk.RendererBase.renderChildren(RendererBase.java:166)
      at org.jboss.seam.ui.renderkit.FragmentRendererBase.doEncodeChildren(FragmentRendererBase.java:29)
      at org.jboss.seam.ui.util.cdk.RendererBase.encodeChildren(RendererBase.java:92)
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:832)
      at org.jboss.seam.ui.util.JSF.renderChild(JSF.java:175)
      at org.jboss.seam.ui.util.JSF.renderChildren(JSF.java:163)
      at org.jboss.seam.mail.ui.UIMessage.encodeChildren(UIMessage.java:165)
      at org.jboss.seam.ui.util.JSF.renderChild(JSF.java:175)
      at org.jboss.seam.ui.util.JSF.renderChildren(JSF.java:163)
      at org.jboss.seam.ui.facelet.FaceletsRenderer.renderFacelet(FaceletsRenderer.java:207)
      at org.jboss.seam.ui.facelet.FaceletsRenderer$1.process(FaceletsRenderer.java:161)
      at org.jboss.seam.ui.facelet.FaceletsRenderer$RenderingContext.run(FaceletsRenderer.java:79)
      at org.jboss.seam.ui.facelet.FaceletsRenderer.render(FaceletsRenderer.java:170)

      The workaround I found is to subclass FaceletsRenderer like this

      @Override
      protected void renderFacelet(FacesContext facesContext, Facelet facelet) throws IOException {
      if(ApplicationAssociate.getCurrentInstance() == null)

      { new ApplicationImpl(); }

      super.renderFacelet(facesContext, facelet);
      }

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                pmuir Pete Muir
                Reporter:
                zigzago Julien Buret
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: