[jboss-user] [EJB 3.0] - Re: javax.transaction.RollbackException

Wolfgang Knauf do-not-reply at jboss.com
Wed Feb 11 09:01:52 EST 2009

Hi Ramu,

which line causes the error? I assume it is "Project project = manager.merge(deleteProject);"?

This one is problematic, because you first load the project, then get the BuyerRating and VendorRating collections, and after this delete the relationships by executing a delete query. This will keep the collections in memory in your loaded project, but they don't exist in the database. 

My suggestion is to change your code this way:
-First delete BuyerRating and VendorRating
-After this load the project by "Project deleteProject = manager.find(Project.class, projectId); "
Currently, you do it the other way round.

Hope this helps


View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4209042#4209042

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4209042

More information about the jboss-user mailing list