12 Replies Latest reply on Jan 16, 2009 1:24 AM by gena

    Email rendering doesn't work with trinidad and seam snapshot

    gena

      Hello guys!


      1. I've got troubles with the email rendering on the latest seam snapshot. If the rendering occurs within the current faces request, the email is sent, but the rendering of response throws an exception:


      FATAL [lifecycle] JSF1054: (Phase ID: RENDER_RESPONSE 6, View ID: /samples/sampleMain.xhtml) Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@64ca18]
      Caused by: java.lang.NullPointerException
              at org.apache.myfaces.trinidadinternal.renderkit.RenderKitDecorator.getRenderKit(RenderKitDecorator.java:119)
      


      2. If i render the email in background (asynchron), the email is not sent due to NullPointerException within com.sun.faces.el.ManagedBeanELResolver because the ApplicationAssociate.getCurrentInstance() is null.


      line 80
      BeanManager manager =   ApplicationAssociate.getCurrentInstance().getBeanManager();



      3. I cannot use for the email rendering (synchron or asynchron) the custom faclets taglib defined within web.xml by using the context parameter


      <context-param>
                <param-name>facelets.LIBRARIES</param-name>
                <param-value>/WEB-INF/rwo.taglib.xml</param-value>
      </context-param>
      



      The runtime throws an Exception below because the rwo-taglib is not registered:



      com.sun.facelets.tag.TagAttributeException: /rwo.war/mails/offer_email_pdf.xhtml @351,79 rendered="#{rwo:objectsIndex(offer.bidsSorted, bid) lt 5 }" Function 'rwo:objectsIndex' not found



      In other circumstances the custom taglib works fine.


      Hope on some explanation or bug fixes.


      Thanks, Gena


      PS. I'm using the latest seam 2.1.x snapshot, latest trinidad 1.2.x snapshot, latest stable production jsf-ri 1.2
      The trinidad resource filter is registered for seam enabling  with

      <web:context-filter url-pattern="/adf/*"/>
      

      as described in a manual.

        • 1. Re: Email rendering doesn't work with trinidad and seam snapshot
          pmuir

          Gena Batalski wrote on May 18, 2008 05:44 PM:


          1. I've got troubles with the email rendering on the latest seam snapshot. If the rendering occurs within the current faces request, the email is sent, but the rendering of response throws an exception:

          FATAL [lifecycle] JSF1054: (Phase ID: RENDER_RESPONSE 6, View ID: /samples/sampleMain.xhtml) Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@64ca18]
          Caused by: java.lang.NullPointerException
                  at org.apache.myfaces.trinidadinternal.renderkit.RenderKitDecorator.getRenderKit(RenderKitDecorator.java:119)
          





          Please report a bug in JIRA.


          2. If i render the email in background (asynchron), the email is not sent due to NullPointerException within com.sun.faces.el.ManagedBeanELResolver because the ApplicationAssociate.getCurrentInstance() is null.

          line 80
          BeanManager manager =   ApplicationAssociate.getCurrentInstance().getBeanManager();





          Full stack trace?




          3. I cannot use for the email rendering (synchron or asynchron) the custom faclets taglib defined within web.xml by using the context parameter

          <context-param>
                    <param-name>facelets.LIBRARIES</param-name>
                    <param-value>/WEB-INF/rwo.taglib.xml</param-value>
          </context-param>
          





          Known limitation, but I don't think there is an issue in JIRA, so please create one.

          • 2. Re: Email rendering doesn't work with trinidad and seam snapshot
            gena

            Issue about facelets.LIBRARIES is here: http://jira.jboss.com/jira/browse/JBSEAM-3014


            Gena

            • 3. Re: Email rendering doesn't work with trinidad and seam snapshot
              gena
              • 4. Re: Email rendering doesn't work with trinidad and seam snapshot
                gena

                Here the stack trace for 2. The runtime can not determine an in the event scope placed component (i use Contexts.getEventContext()) and throws the exception below.


                The same mail can be rendered synchron (within the real JSF-request, however the problem described in JBSEAM-3015 still present).



                3:37:14,906 ERROR [STDERR] java.lang.NullPointerException
                3:37:14,906 ERROR [STDERR]     at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:80)
                3:37:14,906 ERROR [STDERR]     at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
                3:37:14,906 ERROR [STDERR]     at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
                3:37:14,906 ERROR [STDERR]     at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
                3:37:14,906 ERROR [STDERR]     at org.jboss.el.parser.AstValue.getValue(AstValue.java:63)
                3:37:14,906 ERROR [STDERR]     at org.jboss.el.parser.AstNotEqual.getValue(AstNotEqual.java:21)
                3:37:14,906 ERROR [STDERR]     at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
                3:37:14,906 ERROR [STDERR]     at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
                3:37:14,906 ERROR [STDERR]     at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:390)
                3:37:14,906 ERROR [STDERR]     at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:849)
                3:37:14,906 ERROR [STDERR]     at org.jboss.seam.ui.util.JSF.renderChild(JSF.java:181)
                3:37:14,906 ERROR [STDERR]     at org.jboss.seam.ui.util.JSF.renderChildren(JSF.java:163)
                3:37:14,906 ERROR [STDERR]     at org.jboss.seam.ui.util.JSF.renderChild(JSF.java:179)
                3:37:14,906 ERROR [STDERR]     at org.jboss.seam.ui.util.JSF.renderChildren(JSF.java:163)
                3:37:14,906 ERROR [STDERR]     at org.jboss.seam.ui.util.JSF.renderChild(JSF.java:179)
                3:37:14,906 ERROR [STDERR]     at org.jboss.seam.ui.util.JSF.renderChildren(JSF.java:163)
                3:37:14,906 ERROR [STDERR]     at org.jboss.seam.ui.util.JSF.renderChild(JSF.java:179)
                3:37:14,906 ERROR [STDERR]     at org.jboss.seam.ui.util.JSF.renderChildren(JSF.java:163)
                3:37:14,906 ERROR [STDERR]     at org.jboss.seam.mail.ui.MailComponent.encode(MailComponent.java:85)
                3:37:14,906 ERROR [STDERR]     at org.jboss.seam.mail.ui.MailComponent.encode(MailComponent.java:59)
                3:37:14,906 ERROR [STDERR]     at org.jboss.seam.mail.ui.UIBody.encodeChildren(UIBody.java:44)
                3:37:14,906 ERROR [STDERR]     at org.jboss.seam.ui.util.JSF.renderChild(JSF.java:175)
                3:37:14,906 ERROR [STDERR]     at org.jboss.seam.ui.util.JSF.renderChildren(JSF.java:163)
                3:37:14,906 ERROR [STDERR]     at org.jboss.seam.mail.ui.UIMessage.encodeChildren(UIMessage.java:185)
                3:37:14,906 ERROR [STDERR]     at org.jboss.seam.ui.util.JSF.renderChild(JSF.java:175)
                3:37:14,906 ERROR [STDERR]     at org.jboss.seam.ui.util.JSF.renderChildren(JSF.java:163)
                3:37:14,906 ERROR [STDERR]     at org.jboss.seam.ui.facelet.RendererRequest.renderFacelet(RendererRequest.java:112)
                3:37:14,906 ERROR [STDERR]     at org.jboss.seam.ui.facelet.RendererRequest.run(RendererRequest.java:82)
                3:37:14,906 ERROR [STDERR]     at org.jboss.seam.ui.facelet.FaceletsRenderer.render(FaceletsRenderer.java:43)
                3:37:14,906 ERROR [STDERR]     at de.intermobil.appl.offering.notification.OfferNotifierBean.sendOfferPersistedNotification(OfferNotifierBean.java:96)
                3:37:14,906 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                3:37:14,906 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                3:37:14,906 ERROR [STDERR]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                3:37:14,906 ERROR [STDERR]     at java.lang.reflect.Method.invoke(Method.java:597)
                3:37:14,906 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
                3:37:14,906 ERROR [STDERR]     at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
                3:37:14,906 ERROR [STDERR]     at org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:44)
                3:37:14,906 ERROR [STDERR]     at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
                3:37:14,906 ERROR [STDERR]     at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)
                3:37:14,906 ERROR [STDERR]     at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                3:37:14,906 ERROR [STDERR]     at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:46)
                3:37:14,906 ERROR [STDERR]     at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                3:37:14,906 ERROR [STDERR]     at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
                3:37:14,906 ERROR [STDERR]     at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                3:37:14,906 ERROR [STDERR]     at org.jboss.seam.persistence.EntityManagerProxyInterceptor.aroundInvoke(EntityManagerProxyInterceptor.java:26)
                3:37:14,906 ERROR [STDERR]     at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                3:37:14,906 ERROR [STDERR]     at org.jboss.seam.persistence.HibernateSessionProxyInterceptor.aroundInvoke(HibernateSessionProxyInterceptor.java:27)
                3:37:14,906 ERROR [STDERR]     at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                3:37:14,906 ERROR [STDERR]     at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
                3:37:14,906 ERROR [STDERR]     at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:50)
                3:37:14,906 ERROR [STDERR]     at sun.reflect.GeneratedMethodAccessor190.invoke(Unknown Source)
                3:37:14,906 ERROR [STDERR]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                3:37:14,906 ERROR [STDERR]     at java.lang.reflect.Method.invoke(Method.java:597)
                3:37:14,906 ERROR [STDERR]     at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
                3:37:14,906 ERROR [STDERR]     at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
                3:37:14,906 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                3:37:14,906 ERROR [STDERR]     at org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationI
                3:37:14,906 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                3:37:14,906 ERROR [STDERR]     at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.jav
                3:37:14,906 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                3:37:14,906 ERROR [STDERR]     at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
                3:37:14,906 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                3:37:14,906 ERROR [STDERR]     at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
                3:37:14,906 ERROR [STDERR]     at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
                3:37:14,906 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                3:37:14,906 ERROR [STDERR]     at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
                3:37:14,906 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                3:37:14,906 ERROR [STDERR]     at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:83)
                3:37:14,906 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                3:37:14,906 ERROR [STDERR]     at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
                3:37:14,906 ERROR [STDERR]     at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
                3:37:14,906 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                3:37:14,906 ERROR [STDERR]     at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
                3:37:14,906 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                3:37:14,906 ERROR [STDERR]     at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
                3:37:14,906 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                3:37:14,906 ERROR [STDERR]     at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:206)
                3:37:14,906 ERROR [STDERR]     at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:119)
                3:37:14,906 ERROR [STDERR]     at $Proxy668.sendOfferPersistedNotification(Unknown Source)
                3:37:14,906 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                3:37:14,906 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                3:37:14,906 ERROR [STDERR]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                3:37:14,906 ERROR [STDERR]     at java.lang.reflect.Method.invoke(Method.java:597)
                3:37:14,906 ERROR [STDERR]     at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
                3:37:14,906 ERROR [STDERR]     at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
                3:37:14,906 ERROR [STDERR]     at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:76)
                3:37:14,906 ERROR [STDERR]     at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
                3:37:14,906 ERROR [STDERR]     at org.jboss.seam.ejb.RemoveInterceptor.aroundInvoke(RemoveInterceptor.java:41)
                3:37:14,906 ERROR [STDERR]     at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                3:37:14,906 ERROR [STDERR]     at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
                3:37:14,906 ERROR [STDERR]     at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54)
                3:37:14,906 ERROR [STDERR]     at org.javassist.tmp.java.lang.Object_$$_javassist_61.sendOfferPersistedNotification(Object_$$_javassist_61.java)
                3:37:14,906 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                3:37:14,906 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                3:37:14,906 ERROR [STDERR]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                3:37:14,921 ERROR [STDERR]     at java.lang.reflect.Method.invoke(Method.java:597)
                3:37:14,921 ERROR [STDERR]     at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
                3:37:14,921 ERROR [STDERR]     at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:125)
                3:37:14,921 ERROR [STDERR]     at org.jboss.seam.Component.callComponentMethod(Component.java:2199)
                3:37:14,921 ERROR [STDERR]     at org.jboss.seam.core.Events.raiseEvent(Events.java:85)
                3:37:14,921 ERROR [STDERR]     at org.jboss.seam.async.AsynchronousEvent.call(AsynchronousEvent.java:27)
                3:37:14,921 ERROR [STDERR]     at org.jboss.seam.async.Asynchronous.executeInContexts(Asynchronous.java:76)
                3:37:14,921 ERROR [STDERR]     at org.jboss.seam.async.Asynchronous.execute(Asynchronous.java:45)
                3:37:14,921 ERROR [STDERR]     at org.jboss.seam.async.QuartzDispatcher$QuartzJob.execute(QuartzDispatcher.java:240)
                3:37:14,921 ERROR [STDERR]     at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
                3:37:14,921 ERROR [STDERR]     at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)
                3:37:14,921 ERROR [STDERR] java.lang.NullPointerException
                3:37:14,921 ERROR [STDERR]     at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:80)
                3:37:14,921 ERROR [STDERR]     at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
                3:37:14,921 ERROR [STDERR]     at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:72)
                3:37:14,921 ERROR [STDERR]     at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
                3:37:14,921 ERROR [STDERR]     at org.jboss.el.parser.AstValue.getValue(AstValue.java:63)
                3:37:14,921 ERROR [STDERR]     at org.jboss.el.parser.AstNotEqual.getValue(AstNotEqual.java:21)
                3:37:14,921 ERROR [STDERR]     at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
                3:37:14,921 ERROR [STDERR]     at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
                3:37:14,921 ERROR [STDERR]     at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:390)
                3:37:14,921 ERROR [STDERR]     at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:849)
                3:37:14,921 ERROR [STDERR]     at org.jboss.seam.ui.util.JSF.renderChild(JSF.java:181)
                3:37:14,921 ERROR [STDERR]     at org.jboss.seam.ui.util.JSF.renderChildren(JSF.java:163)
                3:37:14,921 ERROR [STDERR]     at org.jboss.seam.ui.util.JSF.renderChild(JSF.java:179)
                3:37:14,921 ERROR [STDERR]     at org.jboss.seam.ui.util.JSF.renderChildren(JSF.java:163)
                3:37:14,921 ERROR [STDERR]     at org.jboss.seam.ui.util.JSF.renderChild(JSF.java:179)
                3:37:14,921 ERROR [STDERR]     at org.jboss.seam.ui.util.JSF.renderChildren(JSF.java:163)
                3:37:14,921 ERROR [STDERR]     at org.jboss.seam.ui.util.JSF.renderChild(JSF.java:179)
                3:37:14,921 ERROR [STDERR]     at org.jboss.seam.ui.util.JSF.renderChildren(JSF.java:163)
                3:37:14,921 ERROR [STDERR]     at org.jboss.seam.mail.ui.MailComponent.encode(MailComponent.java:85)
                3:37:14,921 ERROR [STDERR]     at org.jboss.seam.mail.ui.MailComponent.encode(MailComponent.java:59)
                3:37:14,921 ERROR [STDERR]     at org.jboss.seam.mail.ui.UIBody.encodeChildren(UIBody.java:44)
                3:37:14,921 ERROR [STDERR]     at org.jboss.seam.ui.util.JSF.renderChild(JSF.java:175)
                3:37:14,921 ERROR [STDERR]     at org.jboss.seam.ui.util.JSF.renderChildren(JSF.java:163)
                3:37:14,921 ERROR [STDERR]     at org.jboss.seam.mail.ui.UIMessage.encodeChildren(UIMessage.java:185)
                3:37:14,921 ERROR [STDERR]     at org.jboss.seam.ui.util.JSF.renderChild(JSF.java:175)
                3:37:14,921 ERROR [STDERR]     at org.jboss.seam.ui.util.JSF.renderChildren(JSF.java:163)
                3:37:14,921 ERROR [STDERR]     at org.jboss.seam.ui.facelet.RendererRequest.renderFacelet(RendererRequest.java:112)
                3:37:14,921 ERROR [STDERR]     at org.jboss.seam.ui.facelet.RendererRequest.run(RendererRequest.java:82)
                3:37:14,921 ERROR [STDERR]     at org.jboss.seam.ui.facelet.FaceletsRenderer.render(FaceletsRenderer.java:43)
                3:37:14,921 ERROR [STDERR]     at de.intermobil.appl.offering.notification.OfferNotifierBean.sendOfferPersistedNotification(OfferNotifierBean.java:96)
                3:37:14,921 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                3:37:14,921 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                3:37:14,921 ERROR [STDERR]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                3:37:14,921 ERROR [STDERR]     at java.lang.reflect.Method.invoke(Method.java:597)
                3:37:14,921 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
                3:37:14,921 ERROR [STDERR]     at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
                3:37:14,921 ERROR [STDERR]     at org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:44)
                3:37:14,921 ERROR [STDERR]     at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
                3:37:14,921 ERROR [STDERR]     at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)
                3:37:14,921 ERROR [STDERR]     at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                3:37:14,921 ERROR [STDERR]     at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:46)
                3:37:14,921 ERROR [STDERR]     at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                3:37:14,921 ERROR [STDERR]     at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
                3:37:14,921 ERROR [STDERR]     at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                3:37:14,921 ERROR [STDERR]     at org.jboss.seam.persistence.EntityManagerProxyInterceptor.aroundInvoke(EntityManagerProxyInterceptor.java:26)
                3:37:14,921 ERROR [STDERR]     at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                3:37:14,921 ERROR [STDERR]     at org.jboss.seam.persistence.HibernateSessionProxyInterceptor.aroundInvoke(HibernateSessionProxyInterceptor.java:27)
                3:37:14,921 ERROR [STDERR]     at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                3:37:14,921 ERROR [STDERR]     at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
                3:37:14,921 ERROR [STDERR]     at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:50)
                3:37:14,921 ERROR [STDERR]     at sun.reflect.GeneratedMethodAccessor190.invoke(Unknown Source)
                3:37:14,921 ERROR [STDERR]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                3:37:14,921 ERROR [STDERR]     at java.lang.reflect.Method.invoke(Method.java:597)
                3:37:14,921 ERROR [STDERR]     at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
                3:37:14,921 ERROR [STDERR]     at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
                3:37:14,921 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                3:37:14,921 ERROR [STDERR]     at org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationI
                3:37:14,921 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                3:37:14,921 ERROR [STDERR]     at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.jav
                3:37:14,921 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                3:37:14,921 ERROR [STDERR]     at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
                3:37:14,921 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                3:37:14,921 ERROR [STDERR]     at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
                3:37:14,921 ERROR [STDERR]     at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
                3:37:14,937 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                3:37:14,937 ERROR [STDERR]     at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
                3:37:14,937 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                3:37:14,937 ERROR [STDERR]     at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:83)
                3:37:14,937 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                3:37:14,937 ERROR [STDERR]     at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
                3:37:14,937 ERROR [STDERR]     at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
                3:37:14,937 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                3:37:14,937 ERROR [STDERR]     at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
                3:37:14,937 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                3:37:14,937 ERROR [STDERR]     at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
                3:37:14,937 ERROR [STDERR]     at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                3:37:14,937 ERROR [STDERR]     at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:206)
                3:37:14,937 ERROR [STDERR]     at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:119)
                3:37:14,937 ERROR [STDERR]     at $Proxy668.sendOfferPersistedNotification(Unknown Source)
                3:37:14,937 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                3:37:14,937 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                3:37:14,937 ERROR [STDERR]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                3:37:14,937 ERROR [STDERR]     at java.lang.reflect.Method.invoke(Method.java:597)
                3:37:14,937 ERROR [STDERR]     at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
                3:37:14,937 ERROR [STDERR]     at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
                3:37:14,937 ERROR [STDERR]     at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:76)
                3:37:14,937 ERROR [STDERR]     at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
                3:37:14,937 ERROR [STDERR]     at org.jboss.seam.ejb.RemoveInterceptor.aroundInvoke(RemoveInterceptor.java:41)
                3:37:14,937 ERROR [STDERR]     at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
                3:37:14,937 ERROR [STDERR]     at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
                3:37:14,937 ERROR [STDERR]     at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54)
                3:37:14,937 ERROR [STDERR]     at org.javassist.tmp.java.lang.Object_$$_javassist_61.sendOfferPersistedNotification(Object_$$_javassist_61.java)
                3:37:14,937 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                3:37:14,937 ERROR [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                3:37:14,937 ERROR [STDERR]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                3:37:14,937 ERROR [STDERR]     at java.lang.reflect.Method.invoke(Method.java:597)
                3:37:14,937 ERROR [STDERR]     at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
                3:37:14,937 ERROR [STDERR]     at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:125)
                3:37:14,937 ERROR [STDERR]     at org.jboss.seam.Component.callComponentMethod(Component.java:2199)
                3:37:14,937 ERROR [STDERR]     at org.jboss.seam.core.Events.raiseEvent(Events.java:85)
                3:37:14,937 ERROR [STDERR]     at org.jboss.seam.async.AsynchronousEvent.call(AsynchronousEvent.java:27)
                3:37:14,937 ERROR [STDERR]     at org.jboss.seam.async.Asynchronous.executeInContexts(Asynchronous.java:76)
                3:37:14,937 ERROR [STDERR]     at org.jboss.seam.async.Asynchronous.execute(Asynchronous.java:45)
                3:37:14,937 ERROR [STDERR]     at org.jboss.seam.async.QuartzDispatcher$QuartzJob.execute(QuartzDispatcher.java:240)
                3:37:14,937 ERROR [STDERR]     at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
                3:37:14,937 ERROR [STDERR]     at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:529)





                • 5. Re: Email rendering doesn't work with trinidad and seam snapshot
                  pmuir

                  Please also file a JIRA issue for issue (2) but we will need an example to reproduce this I think.

                  • 6. Re: Email rendering doesn't work with trinidad and seam snapshot
                    gena

                    Hello Pete,


                    about (2)


                    it was my mistake: another controller outjected later, during email rendering, a component with the same name but null value. It took place after i've placed the desired not null component via Contexts.getEventContext().set(...) and therefore, the rendering failed.


                    You can forget the (2).


                    Thank you for your assistance!


                    Gena


                    PS. I compiled a simple example you asked for and didn't find this exception ((1) and (3) still present). It helped me to analyze deeper my ugly code. Sometimes it can be a good idea, to test a new solution on a small prototype without the complex interplay with already existing programs.

                    • 7. Re: Email rendering doesn't work with trinidad and seam snapshot
                      brachie

                      Gena Batalski wrote on May 20, 2008 23:27:


                      Issue for 1 created: http://jira.jboss.com/jira/browse/JBSEAM-3015


                      Hi,


                      ifI understand correctly, the issue above was rejected by Pete, because this should be a Trinidad exception... Well I upgraded my application (which uses Trinidad 1.2.9) from Seam 2.0.1.GA to 2.1.0.SP1 and now I am no longer able to send eMails. I always get the following error when rendering the email with the render method:



                      FATAL [lifecycle] JSF1054: (Phase ID: RENDER_RESPONSE 6, View ID: /templates/mail/confirmation.xhtml) Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@64ca18]
                      Caused by: java.lang.NullPointerException
                              at org.apache.myfaces.trinidadinternal.renderkit.RenderKitDecorator.getRenderKit(RenderKitDecorator.java:119)
                      



                      This is not really nice even if this is not a Seam error... what is the solution??? Downgrading back to Seam 2.0.1? It cannot be!


                      Regards,


                      Alexander

                      • 8. Re: Email rendering doesn't work with trinidad and seam snapshot
                        gena

                        Hi Alexander,


                        i've got a solution by commenting out the line below in a class org.jboss.seam.ui.facelet.RendererRequest, method cleanup() 

                        facesContext.release()

                         
                        and it works.


                        Gena

                        • 9. Re: Email rendering doesn't work with trinidad and seam snapshot
                          brachie

                          Gena Batalski wrote on Dec 10, 2008 22:52:


                          Hi Alexander,

                          i've got a solution by commenting out the line below in a class org.jboss.seam.ui.facelet.RendererRequest, method cleanup() 
                          facesContext.release()

                           
                          and it works.

                          Gena


                          Hi Gena,


                          thank you for the answer, but I do not really want to compile Seam. Maybe I'll give it a try.


                          I really hope that this bug will be fixed soon... is this already known in the Trinidad bug-tracker or is this a Seam 2.1 bug?


                          Regards,


                          Alexander

                          • 10. Re: Email rendering doesn't work with trinidad and seam snapshot
                            gena

                            As i can see, Seam team doesn't recognize it as it's own bug (jira issue rejected). I didn't file it as a trinidad issue. You could try it yourself. I use a self made seam distribution with some minor fixes/changes and it is not the best platform to represent a bug. Before posting this issue, i made a clean project and tested mails with and without trinidad. After all described above seam issues were corrected, only trinidad error still present.


                            Gena


                            • 11. Re: Email rendering doesn't work with trinidad and seam snapshot
                              dcardon

                              A work around for 3. that I used is to replace (for mail views) the custom taglibs with <ui:include> tags.  For example, if I have a custom taglib like this:


                              <custom:myTag attribute="customAttr"/>


                              I can replace this with:


                              <ui:include src="path.to.myTag.markup.xhtml">

                                 <ui:param name="attribute" value="customAttr"/>

                              </ui:include>


                              Anyway, not sure if this helps you, but it certainly helped me work around the problem in a pretty clean way.


                              --Dave

                              • 12. Re: Email rendering doesn't work with trinidad and seam snapshot
                                gena

                                Hi, Dave,
                                it seems to work now, at least with the current Seam version (2.1)/current snapshot also without any other workarounds. The only problem i've got now is the (1). To work around the (1) i did patch Seam mail renderer a little. This patch is also described here.


                                Gena