I have already read on documents saying that Hibernate version 5 is compatible with Java 11. but
- Is Hibernate ORM version 4 also compatible with Java 11?
- if not: What changes are required to upgrade?
CodePudding user response:
Hibernate 4 is not compatible with Java 11 and was declared, for quite some years now, as ”end-of-life“, practically since end of 2015.
Full Java 11 support was announced with Hibernate version 5.4:
Hibernate ORM now supports JDK 11 out of the box.
Hibernate 5.3 lists Java 11 as supported in the latest release 5.3.22. Moreover, Hibernate 5.6 is also Java 11 compatible. This might be the last version in the javax
namespace, yet it supports the transition to the new jakarta
namespace.
Pointers on what changed or needs changes in your project are found via this question or in my answer to a similar question, related to migration from version 4.3 to version 5.2. Many things in that answer should guide you along the path.