You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by "Timothy Ward (JIRA)" <ji...@apache.org> on 2011/07/07 17:57:16 UTC

[jira] [Commented] (ARIES-705) proxy code is weaving JPA metamodel classes and can cause JPA errors

    [ https://issues.apache.org/jira/browse/ARIES-705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13061401#comment-13061401 ] 

Timothy Ward commented on ARIES-705:
------------------------------------

The particular issue here seems to be that OpenJPA doesn't like the generated seralVersionUID which is marked synthetic. OpenJPA probably shouldn't be using synthetic fields for mapping, but given this class isn't Serializable there's no good reason to add a serialization UID.

Preventing the addition of the serialVersionUID for non serializable classes is not hard. This should fix this sort of issue. We will look at how to provide some level of filtering for classes in future.

> proxy code is weaving JPA metamodel classes and can cause JPA errors
> --------------------------------------------------------------------
>
>                 Key: ARIES-705
>                 URL: https://issues.apache.org/jira/browse/ARIES-705
>             Project: Aries
>          Issue Type: Bug
>          Components: Proxy
>    Affects Versions: 0.4
>            Reporter: Kevan Miller
>            Priority: Critical
>
> 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...

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira