OpenLiberty, JakartaEE8 and Hibernate Integration example

Openliberty provides JakartaEE8 support and all you have to do is enable 
It also enables jpa-2.2 + EclipseLink.

If you need to Hibernate with JakartaEE8 instead of EclipseLink, you have to manually include all the features of JakartaEE8 without jpa-2.2 and enable bells-1.0 . See the list below.


For hibernate integration, we are using jpaContainer-2.2 and bells-1.0.

First, add data sources and hibernate libraries to the server.

Next, add hibernate libraries to the application using commonLibraryRef

Then update persistence.xml.

Now you can use the persistence unit in your service layer.

Project structure

Find the source code in my GitHub repository.

How to test? I have integrated the liberty maven plugin and you just need to run mvn libert:dev

MySQL schema is included in the repository.

If you encounter any issues, please report and I will address them.




  1. Is it possible to populate config folder with jars coming as dependencies in pom.xml ? I don't want to put all these jars manually.

    1. I don't think that is possible. You have to enable the features in openLiberty.
      May be you are looking for something like this >>


Post a Comment