Hi Gurpreet, That session ID does not look like the ones Shiro generates by default, which leads me to believe that you might be using a custom SessionDAO which would generate the IDs automatically. This is perfectly fine of course, but if it is the case, are you absolutely sure your SessionDAO is persisting the Session correctly? Could it be a transactional thing, where the session has not been committed to the the session data store by the time the next session lookup occurs? My first suspicion is that this is transactionally related.
Also check that your session timeout global configuration is not very low - 0 or some low number of milliseconds or seconds - this would naturally cause the underlying Session to be invalidated very quickly. Finally, I made some significant improvements to the SessionManager infrastructure over the last few days with more unit tests to verify functionality. I'd recommend updating your Shiro .jars to the latest in SVN if that is at all possible for you. Cheers, Les On Mon, Jul 27, 2009 at 2:47 PM, gkaur<[email protected]> wrote: > > Here is the exception, > > > > I am not sure how the session can be deleted when this is happening right > after the login screen, after putting my credentials. > > > > > > URL/login.jsp > > SERVLET: objectType=login op=read > > Session IDCE696C47FF047F580CD6B5CF119A3855 > > org.apache.shiro.session.UnknownSessionException: There is no session with > id [CE696C47FF047F580CD6B5CF119A3855] > > at > org.apache.shiro.session.mgt.AbstractSessionManager.getSession(AbstractSessionManager.java:231) > > at > org.apache.shiro.session.mgt.AbstractSessionManager.setAttribute(AbstractSessionManager.java:212) > > at > org.apache.shiro.mgt.SessionsSecurityManager.setAttribute(SessionsSecurityManager.java:367) > > at > org.apache.shiro.session.mgt.DelegatingSession.setAttribute(DelegatingSession.java:222) > > at > org.apache.shiro.session.ProxiedSession.setAttribute(ProxiedSession.java:130) > > at > org.apache.shiro.mgt.SessionSubjectBinder.bindToSession(SessionSubjectBinder.java:88) > > at > org.apache.shiro.mgt.SessionSubjectBinder.bind(SessionSubjectBinder.java:80) > > at > org.apache.shiro.mgt.DefaultSecurityManager.bind(DefaultSecurityManager.java:251) > > at > org.apache.shiro.mgt.DefaultSecurityManager.login(DefaultSecurityManager.java:346) > > at > org.apache.shiro.subject.DelegatingSubject.login(DelegatingSubject.java:254) > > at com.vonage.auth.servlet.Login.doGet(Login.java:93) > > at com.vonage.auth.servlet.Login.doPost(Login.java:142) > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) > > at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) > > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) > > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) > > at > org.apache.shiro.web.servlet.ShiroFilter.executeChain(ShiroFilter.java:614) > > at > org.apache.shiro.web.servlet.ShiroFilter.doFilterInternal(ShiroFilter.java:554) > > at > org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:190) > > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) > > at > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) > > at > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) > > at > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) > > at > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) > > at > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) > > at > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) > > at > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) > > at > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845) > > at > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) > > at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) > > at java.lang.Thread.run(Thread.java:619) > > Thank you > Gurpreet > > > > Les Hazlewood-2 wrote: >> >> Hi Gurpreet, >> >> Do you have a stack trace? That exception typically arises when a >> session id is used to look up a session that has been deleted (e.g. >> after expiration). >> >> On Thu, Jul 23, 2009 at 4:56 PM, gkaur<[email protected]> wrote: >>> >>> Hi, >>> >>> I am getting an exception after putting in my correct credentials to a >>> login >>> screen >>> Exception is >>> >>> org.apache.shiro.session.UnknownSessionException: There is no session >>> with >>> id >>> >>> I am not sure what is the cause of this exception >>> >>> But after the login servlet gets called the Page is forwarded to a >>> viewcontacts page. >>> But before even if it gets to that point subject.login(token) fails. >>> >>> Thank you >>> -Gurpreet >>> -- >>> View this message in context: >>> http://n2.nabble.com/Exception%3A-There-is-no-session-with-id-tp3312246p3312246.html >>> Sent from the Shiro User mailing list archive at Nabble.com. >>> >> >> > > -- > View this message in context: > http://n2.nabble.com/Exception%3A-There-is-no-session-with-id-tp3312246p3335672.html > Sent from the Shiro User mailing list archive at Nabble.com. >
