Unable to build Hibernate SessionFactory after upgrading to 5.2.14.Final

Description

Updated from version 5.2.11 to 5.2.14

Startup now yields the following error:

Caused by: javax.persistence.PersistenceException: [PersistenceUnit: .....] Unable to build Hibernate SessionFactory
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.persistenceException(EntityManagerFactoryBuilderImpl.java:970)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:895)
at org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:58)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:55)
...
Caused by: org.hibernate.MappingException: Could not instantiate persister org.hibernate.persister.entity.JoinedSubclassEntityPersister
at org.hibernate.persister.internal.PersisterFactoryImpl.createEntityPersister(PersisterFactoryImpl.java:112)
at org.hibernate.persister.internal.PersisterFactoryImpl.createEntityPersister(PersisterFactoryImpl.java:77)
at org.hibernate.metamodel.internal.MetamodelImpl.initialize(MetamodelImpl.java:128)
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:300)
at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:460)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:892)

After several hours of searching, I somewhat found the error.

If an EntityA has a member variable like

where EntityB inherits from some BaseEntity, the error is generated.
As soon as I change the name "attributes" to something else, or
remove the inheritance from EntityB, the issue seems to be fixed.

A minimal example would look something like this:

However, while the minimal example did not trigger the error,
All other combinations with various of my classes reproduced the error,
when above conditions were met.
So there seem to be some additional requirements to trigger the error, I could not yet determine.

Environment

java-8-32bit, eclipse, tomcat-9

Status

Assignee

Christian Beikov

Reporter

hirokazu

Fix versions

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Worked in

5.2.11

Components

Affects versions

Priority

Major
Configure