Spring-security-core remember-me with persistent token doesn’t work in Grails 2.5.0.
Fails with: HTTP Status 500 - Could not obtain current Hibernate Session; nested exception is org.hibernate.HibernateException: No Session found for current thread
| Error 2015-03-27 09:33:18,549 [http-bio-8080-exec-7] ERROR [/testapp].[gsp] - Servlet.service() for servlet [gsp] in context with path [/testapp] threw exception
Message: Could not obtain current Hibernate Session; nested exception is org.hibernate.HibernateException: No Session found for current thread
Line | Method
->> 63 | getTokenForSeries in grails.plugin.springsecurity.web.authentication.rememberme.GormPersistentTokenRepository
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 49 | doFilter in grails.plugin.springsecurity.web.authentication.RequestHolderAuthenticationFilter
| 82 | doFilter . . . . in grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter
| 1142 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 617 | run . . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 745 | run in java.lang.Thread
Caused by HibernateException: No Session found for current thread
->> 63 | getTokenForSeries in grails.plugin.springsecurity.web.authentication.rememberme.GormPersistentTokenRepository
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 49 | doFilter in grails.plugin.springsecurity.web.authentication.RequestHolderAuthenticationFilter
| 82 | doFilter . . . . in grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter
| 1142 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 617 | run . . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 745 | run in java.lang.Thread
| Error 2015-03-27 09:33:18,586 [http-bio-8080-exec-7] ERROR [/testapp].[grails-errorhandler] - Servlet.service() for servlet grails-errorhandler threw exception
Message: Could not obtain current Hibernate Session; nested exception is org.hibernate.HibernateException: No Session found for current thread
Line | Method
->> 63 | getTokenForSeries in grails.plugin.springsecurity.web.authentication.rememberme.GormPersistentTokenRepository
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 49 | doFilter in grails.plugin.springsecurity.web.authentication.RequestHolderAuthenticationFilter
| 82 | doFilter . . . . in grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter
| 1142 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 617 | run . . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 745 | run in java.lang.Thread
Caused by HibernateException: No Session found for current thread
->> 63 | getTokenForSeries in grails.plugin.springsecurity.web.authentication.rememberme.GormPersistentTokenRepository
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 49 | doFilter in grails.plugin.springsecurity.web.authentication.RequestHolderAuthenticationFilter
| 82 | doFilter . . . . in grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter
| 1142 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 617 | run . . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 745 | run in java.lang.Thread
| Error 2015-03-27 09:33:18,589 [http-bio-8080-exec-7] ERROR [Tomcat].[localhost] - Exception Processing ErrorPage[errorCode=500, location=/grails-errorhandler]
Message: Could not obtain current Hibernate Session; nested exception is org.hibernate.HibernateException: No Session found for current thread
Line | Method
->> 63 | getTokenForSeries in grails.plugin.springsecurity.web.authentication.rememberme.GormPersistentTokenRepository
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 49 | doFilter in grails.plugin.springsecurity.web.authentication.RequestHolderAuthenticationFilter
| 82 | doFilter . . . . in grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter
| 1142 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 617 | run . . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 745 | run in java.lang.Thread
Caused by HibernateException: No Session found for current thread
->> 63 | getTokenForSeries in grails.plugin.springsecurity.web.authentication.rememberme.GormPersistentTokenRepository
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 49 | doFilter in grails.plugin.springsecurity.web.authentication.RequestHolderAuthenticationFilter
| 82 | doFilter . . . . in grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter
| 1142 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 617 | run . . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 745 | run in java.lang.Thread