0

We have a Hibernate 5.6 project (java), and want/need to upgrade the annotations from the javax namespace to jakarta (because other libraries in the same project need to update as well).

I found that a Jakarta-compatible version of Hibernate 5.6 is available here: org.hibernate:hibernate-core-jakarta:5.6.11.Final (note the jakarta postfix). I used this and could mostly replace all import statements from import javax.persistence.xy to import jakarta.persistence.xy. It compiles and the tests are green.

However: We also use the hibernate-tools (more specifically, the Ant task thereof wrapped in a Gradle task) to generate a SQL schema of our entities. This tool uses our hibernate.cfg.xml which contains the settings/mappings etc. Since the upgrade, the tool generates... well, nothing at all. I suspect that the tool looks for the javax-annotations, which are no longer there.

We use org.hibernate:hibernate-tools:5.6.2.Final, a newer version or a jakarta-specific version don't seem to exist.

How can I create the SQL file again?

domin
  • 1,192
  • 1
  • 7
  • 28

0 Answers0