Example to simulate 'no open session' exception.