[jboss-user] [JBoss Seam] - Null pointer rendering mail from @Startup component - seam f

javabr do-not-reply at jboss.com
Tue May 22 19:24:14 EDT 2007


Guys,

I have MessageHome.send() method which is called by the user everytime it saves a new Task on my system. This MessageHome.send() sends an eMail using seam mail component, rendering a xhtml file on file system. 

Well, as these tasks may be scheduled to run on future, I've constructed a @Startup component to run every day, midnight to call MessageHome.send() in order to check if any scheduled e-Mail must be sent.

>From web view, every thing works fine. The message is rendered by seam mail component and sent... no problem.

But, when the same rendering code is called from my startup component, I am getting a null pointer inside org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderKit._addDebugResponseWriters(CoreRenderKit.java:541).

Look at when this code is called:


  | FaceletsRenderer.wrap() {
  | ...
  |          // Wrap the ResponseWriter
  |          originalResponseWriter = facesContext.getResponseWriter();
  |          facesContext.setResponseWriter(facesContext.getRenderKit().createResponseWriter(writer,
  |                   null, null)); //NPE here!
  | 

The exception is raised when facesContext.getRenderKit().createResponseWriter(writer,
                  null, null) runs.

As you see I am using trinidad.

Do you have any ideia how I can solve or workaround it ?
I ve tried to get trinidad sources from svn apache repository, but it seems like it is down. Anyone of you guys could please send me trinidad sources ?

Rgds,
Leo


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4047734#4047734

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4047734



More information about the jboss-user mailing list