The MetamodelImpl.populate() method needs some improvements in the error processing arena. This scenario is coming about due to the changes in
OPENJPA-2027. If our current 2.2.x runtime implementation runs against a metamodel class that was generated prior to the fix in OPENJPA-2027, the exception produced does not show what the error was (and we're missing the "caused by" exception). These updates will help identify the root cause issue.