Skip to content
Advertisement

WARN: HHH90000028: Support for “ is deprecated hibernate log

This is the complete log message:

WARN: HHH90000028: Support for <hibernate-mappings/> is deprecated [RESOURCE : resources/hibernate-configs/hibernate-mappings/mappings.hbm.xml]; migrate to orm.xml or mapping.xml, or enable hibernate.transform_hbm_xml.enabled for on the fly transformation

I’ve tried to look for solutions on the internet. However, articles regarding this log message are scarce. I found this github page which is part of hibernate: DeprecationLogger.java

This part of the source code peaks my interest

JavaScript

Although, I still couldn’t come up with a solution.

My questions are:

  • How to migrate to orm.xml or mapping.xml?
  • How to enable hibernate.transform_hbm_xml.enabled

Advertisement

Answer

Enabling hibernate.transform_hbm_xml.enabled works by adding a config property to persistence.xml or hibernate.cfg.xml, just like every other configuration is made for Hibernate.

Migration to orm.xml (the JPA standard mapping) or mapping.xml (the JPA standard + Hibernate mapping extensions) can be done with the Hibernate Gradle plugin or manually. Since this is a one time task, I would recommend that you setup a dedicated Gradle project to do the migration.

Advertisement