3 Replies Latest reply on Dec 10, 2013 2:44 AM by udaykiran.pulipati

    What Hibernate version in jBoss 5?

    bmelloni

      Hibernate's current production version is 3.5.1, but I expect that the version in jBoss 5.x is older. Lately that information is buried so deeply that it is hard to find.

       

      Does anyone know which version is jBoss using?

       

      Or even better yet, does anyone know of a link that shows the versions of all of the open source components used by jBoss 5.x?

        • 1. Re: What Hibernate version in jBoss 5?
          jaikiran

          I usually use the component-matrix/pom.xml (from the source tag) to find out which version is included. So for AS-5.1.0, the hibernate library versions are http://anonsvn.jboss.org/repos/jbossas/tags/JBoss_5_1_0_GA/component-matrix/pom.xml:

           

              <version.org.hibernate.annotations>3.4.0.GA</version.org.hibernate.annotations>
              <version.org.hibernate.commons.annotations>3.1.0.GA</version.org.hibernate.commons.annotations>
              <version.org.hibernate.ejb3.persistence>1.0.2.GA</version.org.hibernate.ejb3.persistence>
              <version.org.hibernate.entity.manager>3.4.0.GA</version.org.hibernate.entity.manager>
              <version.org.hibernate.validator>3.1.0.GA</version.org.hibernate.validator>
              <version.org.hibernate>3.3.1.GA</version.org.hibernate>
          
          

           

          There's however a JIRA to include this info in the AS release https://jira.jboss.org/jira/browse/JBAS-7804

          • 2. Re: What Hibernate version in jBoss 5?
            saltnlight5

            There are two quick ways you can try:

             

            1) Just do a grep on the file that comes with every dist.

            grep hibernate $JBOSS_HOME/jar-versions.xml

             

            2) or if you don't trust that file, then you can be sure by print the manifest of the jar. If you have groovy, you can use this command:

            groovy -e 'println(new java.util.jar.JarFile(args[0]).manifest.write(System.out))' $JBOSS_HOME/common/lib/hibernate-core.jar

             

            /Z

            • 3. Re: What Hibernate version in jBoss 5?
              udaykiran.pulipati

              Below code can get the version of Hibernate

               

              package com.test;

               

              public class TestBean {

               

                  public static void main(String[] args) {

                      try {

                          String hibernateVersion = org.hibernate.annotations.common.Version.VERSION;

                          System.out.println("Hibernate Version: "+ hibernateVersion);

                      } catch (Exception e) {

                          e.printStackTrace();

                      }

                  }

                

              }

               

              Output: Hibernate Version: 3.1.0.GA