I have a java EE project using JPA (transaction-type=\"JTA\"), hibernate as provider. I write my beans to handle the CRUD things. The program running in JBOSS 7 AS.
I faced the same problem. The detached entity should be re-attached. As @BalusC mentioned, using EntityManager.merge() should be used to attach the detached entity. EntityManager.merge() generates SQL Query which fetches the current state of the entity, on which EntityManager.remove() has to be performed. But in my case it didn't worked.
Try EntityManager.remove(EntityManager.find(Class instead. It worked for me.