| I encounter a NullPointerException in IndexOrUniqueKeySecondPass with Hibernate 5.2.10.Final (stack attached). It appears that problem seems to be linked to @org.hibernate.annotations.Index (deprecated annotation) used in an embeddable component, due to the following code that does not consider that Index can be declared in an embedded field (IndexOrUniqueKeySecondPass, l.75-76): PersistentClass persistentClass = (PersistentClass) persistentClasses.get( column.getPropertyHolder().getEntityName() ); Property property = persistentClass.getProperty( column.getPropertyName() ); This used to work in previous Hibernate version (last known working version: 5.1.2.Final) On my side, replacing getPropertyHolder().getEntityName() by column.getPropertyHolder().getEntityOwnerClassName() fix my problem. PersistentClass persistentClass = (PersistentClass) persistentClasses.get( column.getPropertyHolder().getEntityOwnerClassName() ); Property property = persistentClass.getProperty( column.getPropertyName() ); Encountered stack trace attached to this ticket. I'm working on a PR. |