I am trying to restore user session inside my application. For that I call :
Session.openActiveSessionFromCache(ctx);
Most of the time it works fine. But sometimes I get :
java.lang.UnsupportedOperationException: Session: an attempt was made to open an already opened session.
Edit :
I've add this check :
Session activeSession = Session.getActiveSession();
if (activeSession!=null && activeSession.isOpened()){
return activeSession;
}
activeSession = Session.openActiveSessionFromCache(ctx);
and it did not help
Does anybody have a hint how to tackle that problem?
thanks