Wicket
  1. Wicket
  2. WICKET-5402

NullPointerException when logging out with wicket-atmosphere

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 6.8.0
    • Fix Version/s: 6.13.0, 7.0.0-M1
    • Component/s: wicket-atmosphere
    • Labels:
      None

      Description

      We get the attached NPE when a user logs out.

      Apparently what happens is that there are multiple concurrent requests to one session: one "regular" request and a logout request. The logout request calls Session.get().invalidate(), so the session is invalidated at the end of the request. If this happens when "regular" request is already past the authentication check, it will retrieve the session with a now-invalid cookie, resulting in the creation of a new Session object with a null id. This is then put in a PageKey object for an EventBus subscription. When another, unrelated user logs out, EventBus iterates all PageKey-s and chokes on the one that has a null sessionId.

      1. stack-trace.txt
        1 kB
        Andrei Badea

        Activity

        Andrei Badea created issue -
        Andrei Badea made changes -
        Field Original Value New Value
        Attachment stack-trace.txt [ 12611125 ]
        Martin Grigorov made changes -
        Summary NullPointerException when logging out NullPointerException when logging out with wicket-atmosphere
        Martin Grigorov made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Emond Papegaaij [ papegaaij ] Martin Grigorov [ mgrigorov ]
        Fix Version/s 6.13.0 [ 12325564 ]
        Fix Version/s 7.0.0 [ 12322958 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Martin Grigorov
            Reporter:
            Andrei Badea
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development