users@glassfish.java.net

Re: Hibernate 3.6.0

From: <glassfish_at_javadesktop.org>
Date: Wed, 27 Oct 2010 03:09:57 PDT

Hi Ronak,

I don't know about the "Hibernate JPA Provider" you mentioned - is that an add-on you installed via the Update Center?

Anyway, I used to work with several 3.5.x versions of Hibernate on Glassfish, and I simply let Maven include Hibernate and all dependent libraries in my WAR file.

Using Hibernate on Glassfish 3.0.1, you may run into the following problems:

1) Your app may cause memory leaks on redeployment due conflicting usage of the javasisst bytecode provider used both by Weld (CDI) and Hibernate. See https://glassfish.dev.java.net/issues/show_bug.cgi?id=12368

Using cglib as bytecode provider for Hibernate by adding the following line to your domain.xml may solve the problem:

<jvm-options>-Dhibernate.bytecode.provider=cglib</jvm-options>

2) Using some of the newest JPA 2.0 features, I ran into a number of bugs and omissions in Hibernate 3.5.x. These issues are still marked as unresolved in Hibernate JIRA.

Eclipselink also has problems in this area, and OpenJPA 2.0.1 is currently the only JPA provider that works for me smoothly.

Of course, you may be perfectly happy with Hibernate or Eclipselink if you don't use any of these features.

Best regards,
Harald
[Message sent by forum member 'hwellmann']

http://forums.java.net/jive/thread.jspa?messageID=486326