Closed chrisknoll closed 2 months ago
The no session
seems to relate to fetching extra attributes from an Entity Bean after the session is closed. To keep a session open, you have to have an active trasactions...so the theory is that the transaction was being closed early.
At first I thought this was related to how transactions were being managed: CohortDefinitionService wraps the fetch function in Transactional
, the CohortCharacterization uses an entity graph to fetch all associated elements in one go, and Pathways wasn't doing either so I thought that was it. HOWEVER, in my test enviornment, I have 2 different instances (let's call them 66 and 59) where the 66 one would load correctly, and 59 would lead to no-session. This is very odd because it should always get no-session or not. I need to investigate further.
To make matters worse, after returning to this, neither request leads to a no-sesson error now! But will keep investigating to understand why it happened in the first place.
Edit: after closing and opening the pathway design from atlas UI it caused the no-sesson again....but changing the URL from one to another didn't seem to lead to the error...again, it's a mystery, trying to investigate.
Edit 2: Ok, i understand now: changing the URL (to quickly go from one to another) was failing, but the results showin in the list were from the prior cohort definition. this is bad because switching to another pathway should 'clear' the generations but it left it behidn (probably because of the error fetchign results).
Expected behavior
Opening a cohort pathway and navigating to executions should show a list of data sources.
Actual behavior
Empty table is returned, with no sources. Exception in Logs:
Steps to reproduce behavior
Open existing cohort pathway, navigate to executions. It is not clear if there were prior executions or of data sources have changed since this error was discovered, and it could be Tomcat 9, but will attempt to trace through code to investigate the 'closed session' error.