-
1. Re: workItemByteArray null-pointer exception on getWorkItem
marco.rietveld Apr 16, 2014 6:35 AM (in response to evanknowles)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:
-
2. Re: workItemByteArray null-pointer exception on getWorkItem
evanknowles Apr 16, 2014 7:14 AM (in response to marco.rietveld)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?
-
3. Re: workItemByteArray null-pointer exception on getWorkItem
marco.rietveld Apr 23, 2014 9:22 AM (in response to evanknowles)Evan,
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. :/