Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is hibernate-java8 (hibernate 5.x) jar shown deprecated?

Hibernate 5 and above supports Java8 DateTime Api through jar "hibernate-java8".
But the MavenRepository shows a message Deprecated - use hibernate-core instead) alongside the title of the hibernate-java8 jar.

Why is the hibernate-java8 jar called deprecated even though it is required to gain the hibernate support for java8?

maven repository hibernate-java8

like image 763
Akash Raveendran Avatar asked Sep 29 '16 04:09

Akash Raveendran


People also ask

Is hibernate deprecated?

No, Hibernate is not deprecated.

Which hibernate version is compatible with Java 8?

Hibernate 5.3 Hibernate 5.3 is an upgraded version of 5.2 ORM. It comes with Hibernate Search 5.9. This version supports Java 8 and the latest versions and JPA 2.1 and the latest versions.

What version of Hibernate supports Java 11?

Hibernate 5.3. 6 is compatible with both Java 8 and Java 11, but developers have found a few quirks in the version compatible with JDK 11.


1 Answers

You can see the Migration Guide for Hibernate. It specifies that

Hibernate 5.2 is built using Java 8 JDK and will require Java 8 JRE at runtime (we are investigating whether Java 9 will also work). This has a number of implications:

The hibernate-java8 module has been merged into hibernate-core and the Java 8 date/time types are now natively supported.

(todo) support for Java 8 Optional

(todo) support for other Java 8 features?

The hibernate-java8 module has been removed; that functionality has been consolidated into hibernate-core.

For hibernate-java8 see this ticket for explanation,

As this relies on Java 8 and Hibernate still maintains compatibility back to Java 6, a new module hibernate-java8 was added to isolate the Java 8 compatibility to just these classes. We will fold the classes from this module into hibernate-core once we baseline one Java 8.

Since hibernate no longer maintains the hibernate-java8 and you can see that hibernate-java8 is nothing more than an empty placeholder. Github & JIRA Detail.

So, As the functionality has been merged into hibernate-core; hibernate-java8 now is depreciated.

I hope this answer your queries.

like image 77
Runcorn Avatar answered Oct 09 '22 10:10

Runcorn