In my experience, this is probably due to the external (your) application doing something with transactions at a moment when the jBPM engine doesn't expect it.
Basically, the persistence mechanism in the core engine (WorkItemInfo, SessionInfo) is built around the idea that only the core engine is starting and committing transactions and that no one else is handling them.
Is this a possible cause of your problem?
It might also help to take a look at the code here:
I'd imagine so - I've turned on the container managed transactions. This seems to only occur when more than one user is interacting.
The code you've referenced is the code I've currently made a change to - adding this annotation to workItemByteArray corrects the issue for the container managed transactions by ensuring that the item is loaded;
@javax.persistence.Basic(fetch = javax.persistence.FetchType.EAGER)
I'm trying to check if there's a reason why it's lazy loaded at the moment?
If I had to sum it up, the reason is basically just historical: that's the way the code evolved, so to speak. The actual technical reasons are fairly complex and would probably take me a day to figure out. :/