2 Replies Latest reply on Jan 6, 2010 9:38 AM by 807567

    WS7 cluster session replication

    wgkorb-JavaNet
      Now that my WS7 cluster is up and running, I'm attempting to deploy a simple JSF webapp that incorporates session replication between the nodes in my cluster.

      I've followed the instructions in the WS7 admin guide to enable session replication, and I've added the following to my sun-web.xml deployment descriptor:
        <session-config>
          <session-manager persistence-type="replicated"/>
        </session-config>
      The first problem I discovered was that my JSF managed bean was not serializable, so I fixed that. Now, however, when I load the initial page in my app, I am getting an NPE that looks like it is coming from within the WS7 session replication code:
      [23/Dec/2009:08:46:51] warning ( 3692): for host 172.16.2.47 trying to GET /sessionTest/index.jsf while trying to GET /sessionTest/, service-j2ee reports: executePhase(RENDER_RESPONSE 6,com.sun.faces.context.FacesContextImpl@2de69e99) threw exception
      javax.faces.FacesException
              at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:135)
              at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
              at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
              at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
              at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:398)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:277)
              at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:255)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
              at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
              at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556)
              at com.sun.web.replication.session.SessionLockingStandardPipeline.invoke(SessionLockingStandardPipeline.java:71)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:187)
              at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
              at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556)
              at com.sun.webserver.connector.nsapi.NSAPIProcessor.service(NSAPIProcessor.java:160)
      Caused by: ClientAbortException:  java.io.IOException: WEB8001: Write failed
              at org.apache.coyote.tomcat5.OutputBuffer.realWriteBytes(OutputBuffer.java:385)
              at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:404)
              at org.apache.coyote.tomcat5.OutputBuffer.doFlush(OutputBuffer.java:334)
              at org.apache.coyote.tomcat5.OutputBuffer.flush(OutputBuffer.java:313)
              at org.apache.coyote.tomcat5.CoyoteResponse.flushBuffer(CoyoteResponse.java:622)
              at com.sun.webserver.connector.nsapi.NSAPIResponse.flushBuffer(NSAPIResponse.java:127)
              at org.apache.coyote.tomcat5.CoyoteResponseFacade.flushBuffer(CoyoteResponseFacade.java:291)
              at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:203)
              at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
              ... 14 more
      Caused by: java.io.IOException: WEB8001: Write failed
              at com.sun.webserver.connector.nsapi.NSAPIResponseStream.doWrite(NSAPIResponseStream.java:61)
              at org.apache.coyote.Response.doWrite(Response.java:575)
              at org.apache.coyote.tomcat5.OutputBuffer.realWriteBytes(OutputBuffer.java:380)
              ... 22 more
      
      [23/Dec/2009:08:46:51] warning ( 3692): for host 172.16.2.47 trying to GET /sessionTest/index.jsf while trying to GET /sessionTest/, service-j2ee reports: REPL0080: Received exception while reading session from store [{0}]
      java.lang.NullPointerException
              at com.sun.web.replication.session.LWSFPersistentManager.doRead(LWSFPersistentManager.java:162)
              at com.sun.web.replication.session.LWSFValve.invoke(LWSFValve.java:31)
              at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
              at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556)
              at com.sun.web.replication.session.SessionLockingStandardPipeline.invoke(SessionLockingStandardPipeline.java:71)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:187)
              at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
              at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556)
              at com.sun.webserver.connector.nsapi.NSAPIProcessor.service(NSAPIProcessor.java:160)
      I thought that perhaps once the session was created, I would stop seeing this error. It isn't exactly the same, but I am still seeing an NPE even after the session has been created:
      [23/Dec/2009:08:47:33] warning ( 3692): for host 172.16.2.47 trying to POST /sessionTest/index.jsf, service-j2ee reports: REPL0080: Received exception while reading session from store [{0}]
      java.lang.NullPointerException
              at com.sun.web.replication.session.LWSFPersistentManager.doRead(LWSFPersistentManager.java:162)
              at com.sun.web.replication.session.LWSFValve.invoke(LWSFValve.java:31)
              at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
              at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556)
              at com.sun.web.replication.session.SessionLockingStandardPipeline.invoke(SessionLockingStandardPipeline.java:71)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:187)
              at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
              at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556)
              at com.sun.webserver.connector.nsapi.NSAPIProcessor.service(NSAPIProcessor.java:160)
      Any idea what's going wrong? Is it something I've done?

      I can give you the code for my webapp if you need it.

      Thanks,
      Bill