public class MySessionListener implements HttpSessionListener {
@Override
public void sessionCreated(HttpSessionEvent se) {
((ServletRequestAttributes) RequestContextHolder
.getRequestAttributes()).getRequest().getSession(false);
}
This causes infinite loop since getSession(false) tries to create a new session instead of directly returning null.