A NPE is thrown during metamodel generation (see NullPointerException.txt). Test classes A (an Entity), B (an Embeddable) and C (another Embeddable) which lead to the attached NPE are also included.
When JPAMetaModelEntityProcessor.modelGenerationNeedsToBeDeferred() is called and more than one @Embeddable is present, JPAMetaModelEntityProcessor$ContainsAttributeTypeVisitor.visitDeclared() is reached. In class B, there is a property of type List<byte[]> (any collection of byte[] would do). This leads visitDeclared() to resolve the collection type (byte[]) to an TypeElement using the Types object supplied by javac. For some reason this is null, which results in the NPE a few lines down.
I am not familiar enough with annotation processing to know if a null is the correct response to a byte[]. The javadocs state that null is a possible result from Types.asElement().
|