Uploaded image for project: 'Spring Web Flow'
  1. Spring Web Flow
  2. SWF-1488

Issues during session replication - Flow object not injected/set properly in flow engine or possibility of flow object being null is not handled.

    XMLWordPrintable

    Details

      Description

      A web application (developed in Spring Framework, Web flow, Rich Faces, etc) running in clustered environment (JBoss EAP 5.1.0 on Windows 2008, Sun JRE 1.6) is having session replication issues with the issues in one of the core flow engine/engine implementation class.

      During session replication, while trying to replication the session info (flow objects included), the scenario of flow object being null was not handled.

      2011-08-08 13:00:27,289 ERROR [org.jboss.cache.marshall.CacheMarshaller300] (http-192.168.150.203-8080-3) Error while marshalling object: ReplicateCommand{cmds=PrepareCommand{globalTransac tion=GlobalTransaction:<192.168.150.203:55200>:0, modifications=[PutDataMapCommand{fqn=/_BUDDY_BACKUP_/192.168.150.203_55200/JSESSION/appContext_localhost/ARQl5zk8rm0x8+uFIMEb9Q__, dataVersion=null, data={0=2, 1=1312804827243, 2=org.jboss.web.tomcat.service.session.distributed [email protected], 3=org.jboss.ha.framework.server.SimpleCachableMars halledValue{[email protected] zed=false}}, globalTransaction=null, erase=false}], localAddress=192.168.150.203:55200, onePhaseCommit=true}}
      java.lang.NullPointerException
      at org.springframework.webflow.engine.impl.FlowSessio nImpl.writeExternal(FlowSessionImpl.java:152)
      at java.io.ObjectOutputStream.writeExternalData(Objec tOutputStream.java:1429)
      at java.io.ObjectOutputStream.writeOrdinaryObject(Obj ectOutputStream.java:1398)
      

      The source code, for the method that is failing is given below. (The first line of the method is where "NullPointerException" is happening)

      	public void writeExternal(ObjectOutput out) throws IOException {
      		out.writeObject(flow.getId());
      		out.writeObject(state != null ? state.getId() : null);
      		out.writeObject(scope);
      		out.writeObject(parent);
      	}
      

      Either the webflow core / flow engine implemenation is incorrectly trying to replicate a null flow object (or not injected properly) or flow being "null" object should be handled.

      Could the handling of first line for NULL object be the reasonable fix? (same way as state object)

      Many Thanks.

        Attachments

          Activity

            People

            Assignee:
            rstoya05-aop Rossen Stoyanchev
            Reporter:
            dheepson Dheepson Brightson
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1d
                1d
                Remaining:
                Remaining Estimate - 1d
                1d
                Logged:
                Time Spent - Not Specified
                Not Specified