This content has been marked as final. Show 3 replies
I'm not sure what a Broker is in OpenJPA so you may want to post in an OpenJPA forum. I would suspect though that a broker is underneath the EntityManager, and it might suggest that this EntityManager instance is being shared among threads. Verify that the EntityManager returned is not being used in multiple threads; if it is used in multiple threads concurrently, this needs to be changed to obtian a new one and release it when done as they are not thread safe. You might also try using EclipseLink as the JPA provider to see if you get a different error message that might point out the problem.
I encountered similar issue.
I am not still sure that I have resolved the issue but, you need to check that you are closing ALL EntityManager instances wherever you've requested them. It turns out that if you do not close an EntityManager it tends to be reused, possibly in another thread. But I suspect that this exception will be thrown even when em is reused within a single thread