Wednesday, 27 January 2010

Hibernate Libraries

This one is a massive Gar...

It all started with the installation of the Fish v2.1.1 distribution. Because of updated libraries supplied by the fish installation, certain versions of hibernate won't work - mainly the one that is shipped with the Beans.

So this led me to download and manually add the libraries to the Fish (I decided that all my apps use Hibernate JPA so might as well have a mutual library), this is where the fun begins. To begin with there is no single download that will give you all the libs with dependencies required for Hibernate JPA. I will add that there are notes saying from 3.5.x this will all change.

Anyhoo, I figured out I needed the:

Annotations
Core
Entitymanager

downloads, take all the libs from here and place them in the lib folder of the fish. Then deploy an app, you will probably get an error like this:


.NoSuchMethodError: org.objectweb.asm.ClassWriter

That is because another library is required. At time of writing I don't know why this is, but anyhoo download the slf4j distribution and copy the following lib into the folder:

slf4j-jdk14-1.5.10.jar

...

Full list of libs:
antlr-2.7.6.jar
commons-collections-3.1.jar
dom4j-1.6.1.jar
javassist-3.9.0.GA.jar
jta-1.1.jar
slf4j-api-1.5.8.jar
cglib-2.2.jar
hibernate3.jar
hibernate-annotations.jar
hibernate-commons-annotations.jar
hibernate-core.jar
slf4j-api.jar
dom4j.jar
ejb3-persistence.jar
hibernate-entitymanager.jar
javassist.jar
jta.jar
slf4j-jdk14-1.5.10.jar

Also posted a question about this on the hibernate forums... Lets see how many responses I get:

https://forum.hibernate.org/viewtopic.php?f=1&t=1002285

No comments:

Post a Comment