Details
Description
We have a @MappedSuperclass that is the base for all of our entity bean classes. This class contains the @Version (and @Column for the version field) that all of our entity beans use. But, in ClassMetaData.validateAppIdClass(), if an entity bean class has a superclass, and the entity bean has an @IdClass, it expects that superclass to have an @IdClass also. All of our entity beans have an @IdClass (even if they only have a single part key), but our @MappedSuperclass does not have an @IdClass. This scenario works under JBoss 4.2.0 and Sun AS 9, but produces a NullPointerException in OpenJPA at:
if (_super != null) {
// concrete superclass oids must match or be parent of ours
ClassMetaData sup = getPCSuperclassMetaData();
if (!sup.getObjectIdType().isAssignableFrom(_objectId)) // <--- NullPointerException here