I tried to reprodruce this error with somethink simple like this:
EntityManager entityManager = this.entityManagerFactory.createEntityManager();
entityManager.getTransaction().begin();
Entity entity = new Entity();
entityManager.persist(entity);
entityManager.flush();
entityManager.getTransaction().commit();
entityManager.refresh(entity);
entityManager.close();
I’m getting my error at "entityManager.refresh(entity); " With your Testcase it is not reproduceable, I’m not getting this error in all version (5.3.4, 5.3.3, 5.2.17,5.1.15). I only get the Error with using Seam , except in Version 5.1.15 it is working.