openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Milosz Tylenda (JIRA)" <j...@apache.org>
Subject [jira] Updated: (OPENJPA-386) org.apache.openjpa.meta.ClassMetaData.validateAppIdClass() does not take @MappedSuperclass into account
Date Wed, 26 Aug 2009 17:51:59 GMT

     [ https://issues.apache.org/jira/browse/OPENJPA-386?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Milosz Tylenda updated OPENJPA-386:
-----------------------------------

    Patch Info: [Patch Available]

> org.apache.openjpa.meta.ClassMetaData.validateAppIdClass() does not take @MappedSuperclass
into account
> -------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-386
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-386
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 0.9.7, 1.0.0, 1.0.2
>         Environment: BEA WebLogic 10.0 under Windows XP SP1
>            Reporter: Matthew L. Schwickerath
>            Assignee: Jody Grassel
>         Attachments: OPENJPA-386_1.0.x.patch, OPENJPA-386_1.1.x.patch, OPENJPA-386_1.2.x.patch,
OPENJPA-386_1.3.x.patch, OPENJPA-386_trunk.patch
>
>
> We have a @MappedSuperclass that is the base for all of our entity bean classes.  This
class contains the @Version (and @Column for the version field) that all of our entity beans
use.  But, in ClassMetaData.validateAppIdClass(), if an entity bean class has a superclass,
and the entity bean has an @IdClass, it expects that superclass to have an @IdClass also.
 All of our entity beans have an @IdClass (even if they only have a single part key), but
our @MappedSuperclass does not have an @IdClass.  This scenario works under JBoss 4.2.0 and
Sun AS 9, but produces a NullPointerException in OpenJPA at:
>         if (_super != null) {
>             // concrete superclass oids must match or be parent of ours
>             ClassMetaData sup = getPCSuperclassMetaData();
>             if (!sup.getObjectIdType().isAssignableFrom(_objectId))  // <--- NullPointerException
here

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message