I am getting
I have observed this issue occurs intermittently when I load a lazy loaded entity in the CompletableFuture API.
I have a function runAnonymouslyAndReturnValue which takes a supplier, run the required supplier with elevated permissions and then return back the privilege entities. Following is the definition of the function :
anonymousUser is created like this return new UsernamePasswordAuthenticationToken(null, null, authorities); In function getAuthorities when roles is defined as LAZY
The following exception is generated:
The exception in this part of code stopped coming when I changed the fetch type of roles to EAGER :
After solving above isue, I am seeing this exception again when making use of graphql-dataloaders and making use of following function in Dataloader definition.
The follwing stack trace is generated intermittently :
I am unable to understand, what is causing this issue due to which I am unable to provide a reproducer. |