this example tries to reproduce/isolate some issues
RelatedTest tries to show that relations from inherited with mappedsuperclass are broken
should show up with Caused by: java.lang.NullPointerException at org.eclipse.persistence.mappings.ForeignReferenceMapping.isLockableMapping(ForeignReferenceMapping.java:1090) at org.eclipse.persistence.descriptors.ClassDescriptor.postInitialize(ClassDescriptor.java:3668) at org.eclipse.persistence.descriptors.ClassDescriptor.postInitialize(ClassDescriptor.java:3638)
IdTest shows that MappedSuperClass Id is not picked up
Entity class [class unit2.AbstractEntity] has no primary key specified. It should define either an @Id, @EmbeddedId or an @IdClass. If you have defined PK using any of these annotations then make sure that you do not have mixed access-type (both fields and properties annotated) in your entity class hierarchy. at org.eclipse.persistence.exceptions.ValidationException.noPrimaryKeyAnnotationsFound(ValidationException.java:1422)
OOMTEst (remove comments) shows the OutOfMemory problem I have seen. The Heap dump tells that a mass of RelationalDescriptors are still referenced somewhere.