0 Replies Latest reply on Mar 15, 2017 12:55 AM by Bruno Frascino

    How to upgrade Hibernate in Wildfly 10.1.0.Final

    Bruno Frascino Newbie

      Hello,

       

      I noticed that Wildfly 10.1.0.Final comes with Hibernate 5.0.10.Final but I have a maven project and I want to use the hibernate version 5.2.8 as my JPA provider.

       

      According to this guide:

       

      JPA Reference Guide - WildFly 10 - Project Documentation Editor

       

      Replacing the current Hibernate 5.x jars with a newer version

       

      Just update the current wildfly/modules/system/layers/base/org/hibernate/main folder to contain the newer version (after stopping your WildFly server instance).

      1. Delete *.index files in wildfly/modules/system/layers/base/org/hibernate/main and wildfly/modules/system/layers/base/org/hibernate/envers/main folders.
      2. Backup the current contents of wildfly/modules/system/layers/base/org/hibernate in case you make a mistake.
      3. Remove the older jars and copy new Hibernate jars into wildfly/modules/system/layers/base/org/hibernate/main + wildfly/modules/system/layers/base/org/hibernate/envers/main.
      4. Update the wildfly/modules/system/layers/base/org/hibernate/main/module.xml + wildfly/modules/system/layers/base/org/hibernate/envers/main/module.xml to name the jars that you copied in.
      5. Also update the hibernate-infinispan jars in wildfly/modules/system/layers/base/org/hibernate/infinispan.

       

      It seems that guide is not up to date, I couldn't find any *.index files, I noticed that there's no hibernate-entitymanager-<version> jar for version 5.2.8 anymore as it has been integrated to hibernate-core... what about upgrading other packages as search and validator... ?

       

      So the question is, how can I use Hibernate 5.2.8 in this environment?

       

      I suppose I could disable hibernate Wildfly's version and just add hibernate 5.2.8 dependency in my POM, is that the right way? If so, how can I do that?

      or

      If I have to upgrade the hibernate module from Wildfly, how should I properly do that?

       

      Thanks