Reputation: 1360
I need sessions to be stored in database. I used the database-session plugin from Robert Fischer ( https://github.com/RobertFischer/grails-database-session ) in version 1.2.0 and updated it to grails 2.1. I installed the plugin in my main project and everything works fine except the logout function in spring security core. When i log out via the spring security logout-controller i get the following exception:
URI: /myProject/j_spring_security_logout
Class: grails.plugin.databasesession.InvalidatedSessionException
Message: Session ABD84995E13B9D1AD4DBD228C0E5902C is invalid; cannot access/modify it.
Maybe you know a solution to fix this?
My environment:
Grails 2.1
Spring Security Core 1.2.7
grails-database-session 1.2.0 by Robert Fischer (see Github)
mySQL-Database is connected (JDBC)
Upvotes: 0
Views: 498
Reputation: 1443
This is a bug in Spring Security Core: it is trying to access an invalidated session, which is a violation of the Servlet spec. But, until they fix that, you can set the config.grails.plugin.databasesession.ignoreinvalid
property to true
and you won't get an exception.
Upvotes: 1