This is my Seam component that uses the SessionRenderer:
@Name("administrationAction")
@Scope(SESSION)
public class AdministrationAction implements Serializable {
...
/** Module import business component. */
@In(create = true)
private ModuleImportBc moduleImportBc = null;
/** Push message manager. */
@In
private PushMsgManager pushMsgManager = null;
...
/** Constructor. */
public AdministrationAction()
{
SessionRenderer.addCurrentSession(PushMsgReceiver.PUSH_GROUP_PUSH_MSG_RECEIVER);
log.info("Current session added to message receiver push group.");
}
...
/** Update modules. */
public void updateModules() {
try
{
pushMsgManager.setMessage("grid.msg.module.import.inProgress", true);
SessionRenderer.render(PushMsgReceiver.PUSH_GROUP_PUSH_MSG_RECEIVER);
moduleImportBc.importInputDatas();
moduleImportBc.updateModuleDatas();
pushMsgManager.setMessage(null, true);
SessionRenderer.render(PushMsgReceiver.PUSH_GROUP_PUSH_MSG_RECEIVER);
statusMessages.addFromResourceBundle(INFO, "administration.msg.updateModules.successful");
}
catch (JpaException e)
{
statusMessages.addFromResourceBundle(ERROR, "administration.msg.updateModules.failed");
} catch (CsvFileException e) {
statusMessages.addFromResourceBundle(ERROR, "administration.msg.updateModules.failed");
}
}
...
}
The PushMsgManager is the application scoped component that stores the message data to render with the push mechanism.
After calling "SessionRenderer.render(PushMsgReceiver.PUSH_GROUP_PUSH_MSG_RECEIVER)" the following exception is thrown:
14:14:58,825 ERROR [D2DFaceletViewHandler] Problem in renderResponse: null
java.lang.NullPointerException
at com.icesoft.faces.util.DOMUtils.domDiff(DOMUtils.java:256)
at com.icesoft.faces.context.PushModeSerializer.serialize(PushModeSerializer.java:34)
at com.icesoft.faces.context.BridgeFacesContext$SaveCurrentDocument.serialize(BridgeFacesContext.java:924)
at com.icesoft.faces.context.DOMResponseWriter.endDocument(DOMResponseWriter.java:191)
at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:285)
at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:159)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.render(PersistentFacesState.java:176)
at com.icesoft.faces.webapp.xmlhttp.PersistentFacesState.executeAndRender(PersistentFacesState.java:312)
at com.icesoft.faces.async.render.RunnableRender.run(RunnableRender.java:143)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
at java.lang.Thread.run(Thread.java:662)
Here is my environment:
ICEfaces 1.8.2
JBoss Seam 2.2.2 Final
JBoss 5.1.0 GA
This may be related or fixed by
ICE-7942.