Uploaded image for project: 'Lucee Development'
  1. LDEV-914

sessionInvalidate() causes java.lang.ClassCastException

    Details

    • Type: Bug
    • Status: Deployed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 4.5.4.006
    • Fix Version/s: 4.5.4.007, 5.0.1.26
    • Labels:
      None
    • Environment:

      Reproduced on Mac OS X (10.11.5) and CentOS (centos-release-7-1.1503.el7.centos.2.8.x86_64), Tomcat 8.0.28, Java 1.8.0_66

      Description

      Calling sessionInvalidate() produces java.lang.ClassCastException and the following stack trace:

      lucee.runtime.type.scope.JSession cannot be cast to lucee.runtime.type.scope.storage.StorageScope at
      lucee.runtime.type.scope.ScopeContext.getCFSessionScope(ScopeContext.java:563):563 at
      lucee.runtime.type.scope.ScopeContext.removeSessionScope(ScopeContext.java:577):577 at
      lucee.runtime.type.scope.ScopeContext.invalidateUserScope(ScopeContext.java:964):964 at
      lucee.runtime.PageContextImpl.invalidateUserScopes(PageContextImpl.java:1318):1318 at
      lucee.runtime.functions.system.SessionInvalidate.call(SessionInvalidate.java:31):31 at
      application_cfc$cf.udfCall4(/Path/To/Application.cfc:2292):2292 at...
      ...
      ...

      The error appears to be here:

      https://github.com/lucee/Lucee4/blob/master/lucee-java/lucee-core/src/lucee/runtime/type/scope/ScopeContext.java#L563

      This issue is resolved by reverting to Lucee 4.5.4.003, and then again reproduced by applying 4.5.4.006. As such, it appears to have been introduced in 4.5.4.004 or 4.5.4.005, both of which reference issue #901.

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                michaeloffner Michael Offner
                Reporter:
                ksr Ken Redler
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: