openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marina Vatkina <Marina.Vatk...@Sun.COM>
Subject Re: Open JPA error-Could not locate metadata for the class using alias
Date Tue, 24 Apr 2007 16:21:16 GMT
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. 
> 
> 


Mime
View raw message