|
Due to time constraints I am not going to be able to set this up again to reproduce it but here's what I saw in the debugger.
Every time a query ran on the session the length of nonlazy collections increased by 1. It contained something like a history of all of the non-lazy collections that session had loaded. At the time when the failure occurred, it has length 104. The time when it failed it was running a query on model object A, which joins to B and C. It went back to the start of non-lazy collections and tried to load all of them starting from 0. The one it failed on was a collection from P that associated to Q, nothing to do with A B or C. P and Q were earlyi in the 104 collections.
I patched the Hibernate source to clear() the nonlazy collections, used that in my test cases and the problem went away.
|