Uploaded image for project: 'Aries'
  1. Aries
  2. ARIES-705

proxy code is weaving JPA metamodel classes and can cause JPA errors

    XMLWordPrintableJSON

Details

    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...

      Attachments

        Activity

          People

            Unassigned Unassigned
            kevan Kevan Lee Miller
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: