Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-6639

PageStoreManager$SessionEntry.clear produces NullPointerException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 8.3.0
    • 9.0.0-M1, 8.4.0, 7.14.0
    • wicket
    • None

    Description

      Sometimes when I return to my website after some period I see the following exception:

      java.lang.NullPointerException
       at org.apache.wicket.page.PageStoreManager$SessionEntry.clear(PageStoreManager.java:365)
       at org.apache.wicket.page.PageStoreManager$SessionEntry.valueUnbound(PageStoreManager.java:353)
       at org.apache.catalina.session.StandardSession.removeAttributeInternal(StandardSession.java:1784)
       at org.apache.catalina.session.StandardSession.expire(StandardSession.java:856)
       at org.apache.catalina.session.StandardSession.isValid(StandardSession.java:659)
       at org.apache.catalina.session.ManagerBase.processExpires(ManagerBase.java:573)
       at org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:558)
       at org.apache.catalina.core.StandardContext.backgroundProcess(StandardContext.java:5496)
       at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1351)
       at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1355)
       at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1355)
       at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1333)

       

      This is very hard to investigate what is the reason for this bug from my side because I do not have a stable reproducer , but I believe one of the following 1-line fixes in Wicket

      1. Adding a null check for sessionCache before using it
      2. Making sessionCache field never null

      can resolve this problem.

       

      Attachments

        Activity

          People

            mgrigorov Martin Tzvetanov Grigorov
            mfursov Mikhail Fursov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

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