sailfin
  1. sailfin
  2. SAILFIN-1810

NullPointerException when using JxtaUnicastSender

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: milestone 1
    • Component/s: session_replication
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      1,810

      Description

      After a failure, we can see this exception:
      java.lang.NullPointerException
      at
      com.sun.enterprise.ee.web.sessmgmt.JxtaReplicationSender.sendReplicationState(JxtaReplicationSender.java:403)
      at
      com.sun.enterprise.ee.web.sessmgmt.JxtaBackingStoreImpl.doTransmit(JxtaBackingStoreImpl.java:825)
      at
      com.sun.enterprise.ee.web.sessmgmt.JxtaBackingStoreImpl.saveSimple(JxtaBackingStoreImpl.java:317)
      at
      com.sun.enterprise.ee.web.sessmgmt.JxtaBackingStoreImpl.save(JxtaBackingStoreImpl.java:263)
      at
      org.jvnet.glassfish.comms.replication.dialogmgmt.DialogFragmentStoreImpl.doSave(DialogFragmentStoreImpl.java:533)
      at
      org.jvnet.glassfish.comms.replication.dialogmgmt.DialogFragmentStoreImpl.save(DialogFragmentStoreImpl.java:429)
      ..

      The root cause is a race condition in
      JxtaReplicationSender.sendReplicationState: we lookup the replication target,
      and then we look up the sender for that target. However, if the cluster reshape
      happens between those two statements, there will be no sender for the given
      target (and then we get the NPE).

      In this case, we should either retry looking up the sender (since that has
      presumably changed), or discard the replication state (which is okay for the
      async case, but not the sync case, which would need to throw an exception).

        Activity

        Hide
        Scott Oaks added a comment -

        Checking in
        appserv-core-ee/http-session-persistence/src/java/com/sun/enterprise/ee/web/sessmgmt/JxtaReplicationSender.java;
        /cvs/glassfish/appserv-core-ee/http-session-persistence/src/java/com/sun/enterprise/ee/web/sessmgmt/JxtaReplicationSender.java,v
        <-- JxtaReplicationSender.java
        new revision: 1.18.2.46; previous revision: 1.18.2.45
        done

        Show
        Scott Oaks added a comment - Checking in appserv-core-ee/http-session-persistence/src/java/com/sun/enterprise/ee/web/sessmgmt/JxtaReplicationSender.java; /cvs/glassfish/appserv-core-ee/http-session-persistence/src/java/com/sun/enterprise/ee/web/sessmgmt/JxtaReplicationSender.java,v <-- JxtaReplicationSender.java new revision: 1.18.2.46; previous revision: 1.18.2.45 done

          People

          • Assignee:
            Scott Oaks
            Reporter:
            Scott Oaks
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: