openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig L Russell <Craig.Russ...@Sun.COM>
Subject Re: Open JPA error-Could not locate metadata for the class using alias
Date Tue, 24 Apr 2007 16:40:12 GMT
Hi tbee,

I've only seen bits and pieces of this issue scattered through a  
dozen emails. I understand vaguely that you're trying to separate the  
persistent field definition from the behavior, but can't really  
understand how you're trying to do it.

Would it be possible for you to post a complete (simple) example that  
shows what you are trying to do, including both the classes and the  
database schema, for both sides of the relationship.



On Apr 24, 2007, at 9:21 AM, Marina Vatkina wrote:

> tbee wrote:
>> Marina Vatkina wrote:
>>> I didn't suggest to remove the existing @Entity annotation - what I
>>> suggested was to change the @MappedSuperclass to be an @Entity,  
>>> *and* make it
>>> *abstract*.
>>> The latter will mean that you'll never get its instances back.
>> I've tested this, but OpenJPA still has the same error:
>> org.apache.openjpa.persistence.ArgumentException: Could not locate  
>> metadata
>> for the class using alias "Article". Registered alias mappings:
>> "{Article=null}"
>> As a comparison, Toplink does not accept this approach at all  
>> (@Entity
>> extends @Entity). It requires the superclass to be  
>> MappedSuperclass (@Entity
>> extends @MappedSuperclass).
> This is close to impossible as there are probably CTS tests that  
> use an @Entity
> that extends another @Entity. Are you using JPA in an EE 5  
> container? Otherwise you need to list all antities and mapped  
> superclasses in your persistence.xml.
> -marina
>> So unforntunately this approach seems to be a dead end.

Craig Russell
Architect, Sun Java Enterprise System
408 276-5638
P.S. A good JDO? O, Gasp!

View raw message