Uploaded image for project: 'Hibernate ORM'
  1. HHH-11294

NPE in org.hibernate.jpa.internal.util.PersistenceUtilHelper.isInitialized(PersistentAttributeInterceptable)

    Details

      Description

      Depending upon how bytecode enhancement is set up, PersistentAttributeInterceptable.$$_hibernate_getInterceptor() may return null.
      I noticed this happens with this configuration of the maven enhancer:

      <configuration>
      	<enableAssociationManagement>true</enableAssociationManagement>
      	<enableDirtyTracking>false</enableDirtyTracking>
      	<enableLazyInitialization>true</enableLazyInitialization>
      	<enableExtendedEnhancement>false</enableExtendedEnhancement>
      </configuration>
      

      The problem is at https://github.com/hibernate/hibernate-orm/blob/5.2.5/hibernate-core/src/main/java/org/hibernate/jpa/internal/util/PersistenceUtilHelper.java#L97 - the fix is to just add a null check. Here's a pull request:
      https://github.com/hibernate/hibernate-orm/pull/1660

        Attachments

          Issue links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: