Member Menu
 
 Monthly JBoss newsletter:
 
Java Persistence with Hibernate
CaveatEmptor

Download Overview


Binary Releases

Package Version Release date Category
Hibernate Core 3.2.6 GA 08.02.2008 Production Download
Hibernate Annotations 3.3.1 GA 14.03.2008 Production Download
Hibernate EntityManager 3.3.2 GA 14.03.2008 Production Download
Hibernate Validator 3.0.0 GA 20.03.2007 Production Download
Hibernate Search 3.0.1 GA 20.02.2008 Production Download
Hibernate Shards 3.0.0 Beta2 02.08.2007 Development Download
Hibernate Tools 3.2.2 Beta 09.04.2008 Development Download
NHibernate 1.2.0.GA 03.05.2007 Production Download
NHibernate Extensions 1.0.4 24.01.2007 Production Download

Browse all Hibernate downloads, Browse all NHibernate downloads


Compatibility Matrix

Package Version Core Annotations EntityManager Validator Search Shards Tools
Hibernate Core 3.2.6 GA - 3.2.x, 3.3.x 3.2.x, 3.3.x 3.0.x 3.0.x 3.0.x 3.2.x
Hibernate Annotations 3.3.1 GA 3.2.x - 3.3.x 3.0.x 3.0.x Not compatible 3.2.x
Hibernate EntityManager 3.3.2 GA 3.2.x 3.3.x - 3.0.x 3.0.x Not compatible 3.2.x
Hibernate Validator 3.0.0 GA 3.2.x 3.3.x 3.3.x - 3.0.x 3.0.x 3.2.x
Hibernate Search 3.0.1 GA >= 3.2.2 (better if >= 3.2.6) 3.3.x (better if >= 3.3.1 ) 3.3.x 3.0.x - 3.0.x (3.2.x)
Hibernate Shards 3.0.0 Beta2 3.2.x 3.3.x Not compatible 3.0.x 3.0.x - -
Hibernate Tools 3.2.2 3.2.x 3.2.x and 3.3.x 3.2.x and 3.3.x 3.0.x (3.2.0) - -

Source Control Repositories

Starting in March, 2006 Hibernate source is maintained in a Subversion repository hosted by the JBoss Labs project. Note that some of the modules present in CVS were dropped after import into Subversion; namely Hibernate and Hibernate2 modules. If you need access to these source trees, they are still accessible from the SourceForge CVS repository. For anonymous access, use pserver:anonymous@cvs.sourceforge.net:/cvsroot/hibernate as the CVSROOT.

For anonymous access, the root repository URL is http://anonsvn.jboss.org/repos/hibernate/. For developer access, the root repository URL is https://svn.jboss.org/repos/hibernate/.

Package Developer Anonymous Fisheye ViewVC
Hibernate Core https://svn.jboss.org/repos/hibernate/core/ http://anonsvn.jboss.org/repos/hibernate/core/ Fisheye ViewVC
Hibernate Annotations https://svn.jboss.org/repos/hibernate/annotations/ http://anonsvn.jboss.org/repos/hibernate/annotations/ Fisheye ViewVC
Hibernate EntityManager https://svn.jboss.org/repos/hibernate/entitymanager/ http://anonsvn.jboss.org/repos/hibernate/entitymanager/ Fisheye ViewVC
Hibernate Search https://svn.jboss.org/repos/hibernate/search/ http://anonsvn.jboss.org/repos/hibernate/search/ Fisheye ViewVC
Hibernate validator https://svn.jboss.org/repos/hibernate/validator/ http://anonsvn.jboss.org/repos/hibernate/validator/ Fisheye ViewVC
Hibernate Shards https://svn.jboss.org/repos/hibernate/shards/ http://anonsvn.jboss.org/repos/hibernate/shards/ Fisheye ViewVC

Thus to checkout the latest Hibernate Core source (for example), type

svn co http://anonsvn.jboss.org/repos/hibernate/core/trunk

NHibernate uses Subversion hosted on Sourceforge. The repository URL is https://nhibernate.svn.sourceforge.net/svnroot/nhibernate. Using this URL directly will cause all branches and tags of the project to be checked out, transferring a large volume of data. To check out only the trunk (main development line), use

svn co https://nhibernate.svn.sourceforge.net/svnroot/nhibernate/trunk

You can also browse the NHibernate SVN repository.


Compiling Hibernate

Run build.xml with Ant under JDK 1.2 or later (JKD 1.4 required for Hibernate 3.x, though stubs for some third-party libraries can be created to compile and run Hibernate 3.x under JDK 1.3). From the hibernate-x.x.x directory (or Hibernate2/3 CVS directory), type

  • ant - build the hibernate.jar
  • ant junitreport - run tests using HSQL and report to test_output
  • ant dist - build the distribution (only for full CVS checkout)
  • ant clean - clean up

To run the tests against some other database, first edit src/hibernate.properties. Then run

ant -Djdbc.driver=<jdbc driver classpath> junitreport

You may need to add junit.jar to your $ANT_HOME/lib directory if it is not there already, or alternatively remove the $ANT_HOME/lib/ant-junit.jar file. For Hibernate3, repeat the steps above, but also copy lib/antlr.jar or remove the $ANT_HOME/lib/ant-antlr.jar file. These steps are necessary because Ant ships with plugin stub libraries in its classpath, so Ant plugins for JUnit or Antlr can't be used without copying or removing files (arguably a dysfunctional distribution). If you don't have Ant installed on your machine or don't want to mess with the default Ant installation then, on Windows, just run build.bat to use the bundled Ant libraries.


Compiling Hibernate Annotations, EntityManager, Search, Validator or Shards

You need to use JDK 5.0 or later. After downloading the modules Hibernate3 and the module you are interested in from SVN (see above), you should have the following structure.

  ROOT_DIR
    core (the directory containing Hibernate3)
    annotations
    commons-annotations
    entitymanager
    jpa-api
    search
    validator
    shards
      ...

Important note, the current Hibernate ext trunk works with Hibernate Core 3.2, be sure to get Hibernate3 from svn co http://anonsvn.jboss.org/repos/hibernate/branches/Branch_3_2/Hibernate3

From {%ROOT_DIR%}, go into core and run:

ant clean jar prepare-dir-up

This will create a directory {%ROOT_DIR%}/hibernate3.2. Then (for example to build annotations) go to {%ROOT_DIR%}/annotations and run:

  • ant jar to compile and create hibernate-annotations.jar
  • ant junitreport to run tests using HSQL and report to test_output
  • ant clean to clean up

To run the tests against some other database, first edit src/hibernate.properties (can sometimes be found in etc/hibernate.properties). Then run

ant -Djdbc.driver=<jdbc driver classpath> junitreport

You may need to add junit.jar to your $ANT_HOME/lib directory if it is not there already, or alternatively remove the $ANT_HOME/lib/ant-junit.jar file. These steps are necessary because Ant ships with plugin stub libraries in its classpath, so Ant plugins for JUnit or Antlr can't be used without copying or removing files (arguably a dysfunctional distribution).


Compiling Hibernate Tools

See How to contribute to Tools.


Compiling NHibernate

Go to the top-level directory of the source distribution (the directory containing default.build) and run

nant build

NHibernate can also be built from Visual Studio 2005. Run

nant visual-studio

to (re-)generate AssemblyInfo.cs files adapted for Visual Studio. Then open NHibernate-2.0.sln or NHibernate.Everything-2.0.sln.

© Copyright 2006, Red Hat Middleware, LLC. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc. [Privacy Policy]