You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shiro.apache.org by Fedor Belov <fb...@gramant.ru> on 2014/10/29 01:39:40 UTC
What's the correct way to use native sessions?
Hello.
I configured Shiro to use native sessions. If session was invalidated Shiro
throws an exception:
org.apache.shiro.session.ExpiredSessionException: Session with id
[47e946a2-4c0a-46e3-87f2-569794acbf4a] has expired. Last access time:
29.10.14 4:35. Current time: 29.10.14 4:35. Session timeout is set to 0
seconds (0 minutes)
org.apache.shiro.session.mgt.SimpleSession.validate(SimpleSession.java:292)
org.apache.shiro.session.mgt.AbstractValidatingSessionManager.doValidate(AbstractValidatingSessionManager.java:186)
org.apache.shiro.session.mgt.AbstractValidatingSessionManager.validate(AbstractValidatingSessionManager.java:143)
org.apache.shiro.session.mgt.AbstractValidatingSessionManager.doGetSession(AbstractValidatingSessionManager.java:120)
org.apache.shiro.session.mgt.AbstractNativeSessionManager.lookupSession(AbstractNativeSessionManager.java:108)
org.apache.shiro.session.mgt.AbstractNativeSessionManager.lookupRequiredSession(AbstractNativeSessionManager.java:112)
org.apache.shiro.session.mgt.AbstractNativeSessionManager.setAttribute(AbstractNativeSessionManager.java:216)
org.apache.shiro.session.mgt.DelegatingSession.setAttribute(DelegatingSession.java:151)
org.apache.shiro.session.ProxiedSession.setAttribute(ProxiedSession.java:128)
org.apache.shiro.mgt.DefaultSubjectDAO.mergePrincipals(DefaultSubjectDAO.java:205)
org.apache.shiro.mgt.DefaultSubjectDAO.saveToSession(DefaultSubjectDAO.java:166)
I think it's totally inappropriate behaviour. Can I configure Shiro to skip
this exception and treat user as guest?
I found a lot of threads with this exception but there were no correct
solution.
--
View this message in context: http://shiro-user.582556.n2.nabble.com/What-s-the-correct-way-to-use-native-sessions-tp7580295.html
Sent from the Shiro User mailing list archive at Nabble.com.