NPE in org.hibernate.jpa.internal.util.PersistenceUtilHelper.isInitialized(PersistentAttributeInterceptable)
Activity
Show:
Former user March 15, 2017 at 12:21 AM
Fixed in 5.1 branch as well.
Vlad Mihalcea December 8, 2016 at 8:55 AM
@Former user You might want to backport this one too.
Fixed
Details
Details
Assignee
Unassigned
UnassignedReporter
Craig Andrews
Craig AndrewsComponents
Priority
Created November 30, 2016 at 7:15 PM
Updated March 15, 2017 at 12:34 AM
Resolved March 15, 2017 at 12:21 AM
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