Uploaded image for project: 'WINDUPRULE - Red Hat Application Migration Toolkit rules'
  1. WINDUPRULE - Red Hat Application Migration Toolkit rules
  2. WINDUPRULE-368 EAP 7.2 Migration: Hibernate ORM 5.1 to Hibernate ORM 5.3 App Migration
  3. WINDUPRULE-379

EAP 7.2 Migration: Hibernate ORM 5.1 to Hibernate ORM 5.3 App Migration - references to org.hibernate.HibernateException

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Done
    • Icon: Major Major
    • 4.2.1.Final
    • None
    • None
    • None
    • Sprint 63, Sprint 64

      Documentation (preview) about the[ issue:|https://doc-stage.usersys.redhat.com/documentation/en-us/jboss_enterprise_application_platform_continuous_delivery/14/html-single/migration_guide/#migrating_from_hibernate_5_1_to_5_3
      ]

      An abstract (yet working) Hibernate 5.3 PoC rule may be found at https://github.com/emmartins/windup-rulesets/blob/WINDUPRULE-372/rules-reviewed/eap7/eap71/hibernate51-53.windup.xml , which should be broken into multiple rules targeting each concrete Hibernate 5.3 migration issue at https://github.com/hibernate/hibernate-orm/blob/5.3/migration-guide.adoc

      Note the example rule reference above should have the EAP Traget set to
      <targetTechnology id="eap" versionRange="[7,8)" />

      5.2 migration notes: `org.hibernate.HibernateException` now extends `javax.persistence.PersistenceExceptions`. Hibernate methods
      that "override" methods from their JPA counterparts now will also throw various JDK defined RuntimeExceptions
      (such as `IllegalArgumentException`, `IllegalStateException`, etc) as required by the JPA contract.

      Windup rule:

      When: If the SessionFactory is built via Hibernate’s native bootstrapping, and org.hibernate.HibernateException or a subclass is referenced by the application (NOTE: list of subclasses can be found at http://docs.jboss.org/hibernate/orm/5.3/javadocs/org/hibernate/HibernateException.html)
      Perform: Set hibernate.native_exception_handling_51_compliance configuration property to true.

      *Note only a rule can be developed for the second part of the when criteria 'or a subclass......').

              pcattana Philip Cattanach
              pcattana Philip Cattanach
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: