JPA/Hibernate Static Metamodel Attributes not Populated — NullPointerException
问题 I would like to use JPA2 Criteria API with metamodel objects, which seems to be pretty easy: ... Root<JPAAlbum> albm = cq.from(JPAAlbum.class); ... albm.get(JPAAlbum_.theme) ... ; but this Root.get always throws a NullPointerException . JPAAlbum_.theme was automatically generated by Hibernate and looks like public static volatile SingularAttribute<JPAAlbum, JPATheme> theme; but it\'s obviously never populated. Am I missing a step in the initialization of the framework ? EDIT: here is a