Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hibernate version?

I'm using JBoss Embedded version beta3.SP10 and I'm facing a persistence bug that is should be fixed in some Hibernate version. Sadly, I don't know what version of Hibernate is used in my JBoss Embedded and couldn't find a way to find this information, the hibernate-all.jar bundled in it doesn't contain a org.hibernate.Version class, nor a MANIFEST.

How can I find the currently loaded Hibernate version without using org.hibernate.Version?

like image 308
Kawu Avatar asked Aug 13 '10 20:08

Kawu


People also ask

Which Hibernate version should I use?

Use Spring's latest stable version (4.0. 5 at the moment, as clearly indicated on the home page), and Hibernate's latest stable version (4.3. 5.

Which Hibernate version is compatible with Java 11?

Hibernate 5.3 lists Java 11 as supported in the latest release 5.3. 22. Moreover, Hibernate 5.6 is also Java 11 compatible.

Which version of Hibernate is compatible with Spring 5?

Spring 5x is compatible with hibernate 4x unless you are using it as an implementation of JPA which might not be compatible.


2 Answers

Try this,

System.out.println(org.hibernate.Version.getVersionString());

found here

like image 124
max3d Avatar answered Sep 29 '22 00:09

max3d


Another way to obtain the version.

System.out.println(org.hibernate.cfg.Environment.VERSION)

This is for older version of Hibernate. e.g. 3.3.1.GA

like image 22
g5thomas Avatar answered Sep 29 '22 01:09

g5thomas