Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Fixed
-
0.4
-
None
Description
Aries proxy code is weaving JPA metamodel classes. This results in the following error for current OpenJPA (2.1.x):
java.lang.IllegalStateException: localized message key: meta-field-not-param; substitutions: [class com.foo.Baz_, serialVersionUID, long]
at org.apache.openjpa.persistence.meta.MetamodelImpl.getParameterziedType(MetamodelImpl.java:341)
at org.apache.openjpa.persistence.meta.MetamodelImpl.populate(MetamodelImpl.java:310)
at org.apache.openjpa.persistence.meta.MetamodelImpl.instantiate(MetamodelImpl.java:257)
at org.apache.openjpa.persistence.meta.MetamodelImpl.find(MetamodelImpl.java:226)
at org.apache.openjpa.persistence.meta.MetamodelImpl.<init>(MetamodelImpl.java:91)
at org.apache.openjpa.persistence.EntityManagerFactoryImpl.getMetamodel(EntityManagerFactoryImpl.java:346)
at org.apache.openjpa.persistence.EntityManagerFactoryImpl.getCriteriaBuilder(EntityManagerFactoryImpl.java:333)
at org.apache.openjpa.persistence.EntityManagerImpl.getCriteriaBuilder(EntityManagerImpl.java:1638)
at org.apache.openjpa.persistence.EntityManagerImpl.getCriteriaBuilder(EntityManagerImpl.java:101)
at com.foo.Test.query(Test.java:xxx)
See https://issues.apache.org/jira/browse/OPENJPA-2024
IMO, MetaModel classes (annotated with javax.persistence.metamodel.StaticMetamodel) should be ignored by aries weaving...