Uploaded image for project: 'Shiro'
  1. Shiro
  2. SHIRO-388

Stackoverflow org.apache.shiro.session.SessionListener.onStop()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.2.1
    • 1.2.2
    • Session Management
    • None
    • Tomcat, Struts framework

    Description

      While trying to access the session variable in the Sessionlistener onStop() method cyclic call happens and ends with stack overflow . just sent the part of the stacktrace. few lines get repeated lot and ends with exception

      SEVERE: Servlet.service() for servlet jsp threw exception
      java.lang.StackOverflowError
      at java.text.SimpleDateFormat.zeroPaddingNumber(Unknown Source)
      at java.text.SimpleDateFormat.subFormat(Unknown Source)
      at java.text.SimpleDateFormat.format(Unknown Source)
      at java.text.SimpleDateFormat.format(Unknown Source)
      at java.text.DateFormat.format(Unknown Source)
      at org.apache.log4j.helpers.PatternParser$DatePatternConverter.convert(PatternParser.java:443)
      at org.apache.log4j.helpers.PatternConverter.format(PatternConverter.java:65)
      at org.apache.log4j.PatternLayout.format(PatternLayout.java:506)
      at org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:310)
      at org.apache.log4j.WriterAppender.append(WriterAppender.java:162)
      at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)
      at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:66)
      at org.apache.log4j.Category.callAppenders(Category.java:206)
      at org.apache.log4j.Category.forcedLog(Category.java:391)
      at org.apache.log4j.Category.debug(Category.java:260)
      at com.stutzen.abc.common.LoggerManager.writeHelperInfo(LoggerManager.java:52)
      at com.stutzen.abc.shiro.SessionListener.onStop(SessionListener.java:37)
      at org.apache.shiro.session.mgt.AbstractNativeSessionManager.notifyStop(AbstractNativeSessionManager.java:158)
      at org.apache.shiro.session.mgt.AbstractValidatingSessionManager.onInvalidation(AbstractValidatingSessionManager.java:174)
      at org.apache.shiro.web.session.mgt.DefaultWebSessionManager.onInvalidation(DefaultWebSessionManager.java:221)
      at org.apache.shiro.session.mgt.AbstractValidatingSessionManager.validate(AbstractValidatingSessionManager.java:148)
      at org.apache.shiro.session.mgt.AbstractValidatingSessionManager.doGetSession(AbstractValidatingSessionManager.java:120)
      at org.apache.shiro.session.mgt.AbstractNativeSessionManager.lookupSession(AbstractNativeSessionManager.java:105)
      at org.apache.shiro.session.mgt.AbstractNativeSessionManager.lookupRequiredSession(AbstractNativeSessionManager.java:109)
      at org.apache.shiro.session.mgt.AbstractNativeSessionManager.getAttribute(AbstractNativeSessionManager.java:206)
      at org.apache.shiro.session.mgt.DelegatingSession.getAttribute(DelegatingSession.java:141)
      at org.apache.shiro.session.ProxiedSession.getAttribute(ProxiedSession.java:121)
      at com.stutzen.abc.utils.CUtils.getSessionAttribute(CUtils.java:279)
      at com.stutzen.abc.shiro.SessionListener.setRequestEmployeeStatus(SessionListener.java:47)
      at com.stutzen.abc.shiro.SessionListener.onStop(SessionListener.java:38)
      at org.apache.shiro.session.mgt.AbstractNativeSessionManager.notifyStop(AbstractNativeSessionManager.java:158)
      at org.apache.shiro.session.mgt.AbstractValidatingSessionManager.onInvalidation(AbstractValidatingSessionManager.java:174)
      at org.apache.shiro.web.session.mgt.DefaultWebSessionManager.onInvalidation(DefaultWebSessionManager.java:221)
      at org.apache.shiro.session.mgt.AbstractValidatingSessionManager.validate(AbstractValidatingSessionManager.java:148)
      at org.apache.shiro.session.mgt.AbstractValidatingSessionManager.doGetSession(AbstractValidatingSessionManager.java:120)
      at org.apache.shiro.session.mgt.AbstractNativeSessionManager.lookupSession(AbstractNativeSessionManager.java:105)
      at org.apache.shiro.session.mgt.AbstractNativeSessionManager.lookupRequiredSession(AbstractNativeSessionManager.java:109)
      at org.apache.shiro.session.mgt.AbstractNativeSessionManager.getAttribute(AbstractNativeSessionManager.java:206)
      at org.apache.shiro.session.mgt.DelegatingSession.getAttribute(DelegatingSession.java:141)
      at org.apache.shiro.session.ProxiedSession.getAttribute(ProxiedSession.java:121)
      at com.stutzen.abc.utils.CUtils.getSessionAttribute(CUtils.java:279)
      at com.stutzen.abc.shiro.SessionListener.setRequestEmployeeStatus(SessionListener.java:47)
      at com.stutzen.abc.shiro.SessionListener.onStop(SessionListener.java:38)
      at org.apache.shiro.session.mgt.AbstractNativeSessionManager.notifyStop(AbstractNativeSessionManager.java:158)
      at org.apache.shiro.session.mgt.AbstractValidatingSessionManager.onInvalidation(AbstractValidatingSessionManager.java:174)
      at org.apache.shiro.web.session.mgt.DefaultWebSessionManager.onInvalidation(DefaultWebSessionManager.java:221)
      at org.apache.shiro.session.mgt.AbstractValidatingSessionManager.validate(AbstractValidatingSessionManager.java:148)
      at org.apache.shiro.session.mgt.AbstractValidatingSessionManager.doGetSession(AbstractValidatingSessionManager.java:120)
      at org.apache.shiro.session.mgt.AbstractNativeSessionManager.lookupSession(AbstractNativeSessionManager.java:105)
      at org.apache.shiro.session.mgt.AbstractNativeSessionManager.lookupRequiredSession(AbstractNativeSessionManager.java:109)
      at org.apache.shiro.session.mgt.AbstractNativeSessionManager.getAttribute(AbstractNativeSessionManager.java:206)
      at org.apache.shiro.session.mgt.DelegatingSession.getAttribute(DelegatingSession.java:141)
      at org.apache.shiro.session.ProxiedSession.getAttribute(ProxiedSession.java:121)
      at com.stutzen.abc.utils.CUtils.getSessionAttribute(CUtils.java:279)
      at com.stutzen.abc.shiro.SessionListener.setRequestEmployeeStatus(SessionListener.java:47)
      at com.stutzen.abc.shiro.SessionListener.onStop(SessionListener.java:38)
      at org.apache.shiro.session.mgt.AbstractNativeSessionManager.notifyStop(AbstractNativeSessionManager.java:158)
      at org.apache.shiro.session.mgt.AbstractValidatingSessionManager.onInvalidation(AbstractValidatingSessionManager.java:174)
      at org.apache.shiro.web.session.mgt.DefaultWebSessionManager.onInvalidation(DefaultWebSessionManager.java:221)
      at org.apache.shiro.session.mgt.AbstractValidatingSessionManager.validate(AbstractValidatingSessionManager.java:148)
      at org.apache.shiro.session.mgt.AbstractValidatingSessionManager.doGetSession(AbstractValidatingSessionManager.java:120)
      at org.apache.shiro.session.mgt.AbstractNativeSessionManager.lookupSession(AbstractNativeSessionManager.java:105)
      at org.apache.shiro.session.mgt.AbstractNativeSessionManager.lookupRequiredSession(AbstractNativeSessionManager.java:109)
      at org.apache.shiro.session.mgt.AbstractNativeSessionManager.getAttribute(AbstractNativeSessionManager.java:206)
      at org.apache.shiro.session.mgt.DelegatingSession.getAttribute(DelegatingSession.java:141)
      at org.apache.shiro.session.ProxiedSession.getAttribute(ProxiedSession.java:121)
      at com.stutzen.abc.utils.CUtils.getSessionAttribute(CUtils.java:279)
      at com.stutzen.abc.shiro.SessionListener.setRequestEmployeeStatus(SessionListener.java:47)
      at com.stutzen.abc.shiro.SessionListener.onStop(SessionListener.java:38)
      at org.apache.shiro.session.mgt.AbstractNativeSessionManager.notifyStop(AbstractNativeSessionManager.java:158)
      at org.apache.shiro.session.mgt.AbstractValidatingSessionManager.onInvalidation(AbstractValidatingSessionManager.java:174)
      at org.apache.shiro.web.session.mgt.DefaultWebSessionManager.onInvalidation(DefaultWebSessionManager.java:221)
      at org.apache.shiro.session.mgt.AbstractValidatingSessionManager.validate(AbstractValidatingSessionManager.java:148)
      at org.apache.shiro.session.mgt.AbstractValidatingSessionManager.doGetSession(AbstractValidatingSessionManager.java:120)

      Attachments

        Activity

          People

            Unassigned Unassigned
            arvindwill Arvind S
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: