Based on new information, I am rephrasing my question, keeping the original text below for reference:
When switching to Hibernate 6, I got requirements for new packages to include. I do not understand why those packages are needed, so I need further information what they do. Doing a search on Google or Stack Overflow mostly ends with "just add the package".
Questions (see below for answers):
- Why is hibernate-validator needed in Hibernate 6, but not in Hibernate 5?
- Why is hibernate-core-jakarta needed instead of hibernate-core?
- Why is jakarta.el-api needed?
Original Text:
I am using functionality as specified by JPA with Hibernate as implementation. Thus, I am including jakarta.persistence-api and jakarta.validation-api, as well as the required Hibernate packages.
Up to version 5.6.10, including hibernate-core-jakarta seemed to be the right thing to do. Using that package, everything worked out-of-the-box.
I have now switched to Hibernate 6.1.2. Here, hibernate-core-jakarta does not exist anymore. Thus, I am including hibernate-core now. Based on error messages I got, I also added hibernate-validator 7.0.5.Final and jakarta.el-api 5.0.1.
Now, things seem to work. Still, I am wondering: Why was hibernate-core-jakarta removed? Is the solution I found the correct one, or is there a hidden problem now?
Edit: based on some more things I read I can probably better phrase what is puzzling me:
- As far as I know, Hibernate was originally a library independent of JPA. Then it was adapted to implement the JPA standard. (Please correct me if I am wrong.)
- I thought using the hibernate-core-jakarta package was the equivalent to "use JPA compatibility" and hibernate-core was the equivalent to "use only Hibernate".
- Now I think that maybe hibernate-core-jakarta meant "use JPA from Jakarta" and hibernate-core meant "use old JPA from Java EE" (javax).
- This, of course means that now Java EE is no longer supported and thus hibernate-core inherited the functionality from hibernate-core-jakarta!?
- However, if that is true, why did I start needing additional libraries when moving on to the new version?