[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: why nobody talks openJPA here?

ajay662 do-not-reply at jboss.com
Thu Mar 27 17:16:34 EDT 2008


Let me wrap up my findings for the benefit of others.

I ended up using Hibernate. 

With 0.9.7 openjpa, i ran into the error that others have experienced too: org.apache.openjpa.persistence.PersistenceException: Invalid use of
  | destroyed classloader, UCL destroyed at:

With 1.0 openjpa, my application came up ok but I saw all kinds of strange runtime errors.

So I gave up on openjpa and switched to hibernate.

But switching to Hibernate was not all that straight forward. It seems there are some inconsistencies between hibernate and openjpa when it comes to @IdClass.  The two that I faced were : 

1) Hibernate picks up the annotations from @IdClass, whereas openJPA picks up from the Entity class.

2) Hibernate needs both name and type of the id fields to be same in Entity class and IdClass, whereas OpenJPA wants type of the @ManyToOne field in the IdClass to be that of the primary key of the associated table.

Once I aligned my code to what hibernate wants, my application came up ok.

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

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



More information about the jboss-user mailing list