EntityExistsException « Update « JPA Q&A





3. org.apache.openjpa.persistence.EntityExistsException    coderanch.com

Caused By: org.apache.openjpa.persistence.EntityExistsException: An object of type "com.x.dat.auth.CTSTrade" with oid "com.x.dat.auth.CTSTrade - 1705307253 194413170 72116248 42307307 " already exists in this context; another cannot be persisted. atorg.apache.openjpa.kernel.BrokerImpl.persist(BrokerImpl.java:2360) atorg.apache.openjpa.kernel.AttachStrategy.persist(AttachStrategy.java:91) atorg.apache.openjpa.kernel.VersionAttachStrategy.attach(VersionAttachStrategy.java:85) atorg.apache.openjpa.kernel.AttachManager.attach(AttachManager.java:236) atorg.apache.openjpa.kernel.AttachStrategy.attachCollection(AttachStrategy.java:326) atorg.apache.openjpa.kernel.AttachStrategy.replaceCollection(AttachStrategy.java:294) atorg.apache.openjpa.kernel.AttachStrategy.attachField(AttachStrategy.java:216) atorg.apache.openjpa.kernel.VersionAttachStrategy.attach(VersionAttachStrategy.java:137) atorg.apache.openjpa.kernel.AttachManager.attach(AttachManager.java:236) atorg.apache.openjpa.kernel.AttachManager.attach(AttachManager.java:97) atorg.apache.openjpa.kernel.BrokerImpl.attach(BrokerImpl.java:3125) atkodo.kernel.KodoBroker.attach(KodoBroker.java:245) We are using openJpa 0.9 version in application. getting above exception when we do merge on entitymanager. Please help me out on this ...