openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Linskey" <plins...@bea.com>
Subject RE: Open JPA error-Could not locate metadata for the class using alias
Date Tue, 24 Apr 2007 17:22:33 GMT
+1. I imagine that the @Entity-extends-@Entity failure in Toplink was
due to mapping specifications or something that Toplink didn't support.

If you could attach a small domain that produces the errors, that would
help make the discussion more concrete.

-Patrick

-- 
Patrick Linskey
BEA Systems, Inc.
_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it. 

> -----Original Message-----
> From: Craig.Russell@Sun.COM [mailto:Craig.Russell@Sun.COM] 
> Sent: Tuesday, April 24, 2007 9:40 AM
> To: open-jpa-dev@incubator.apache.org
> Subject: Re: Open JPA error-Could not locate metadata for the 
> class using alias
> 
> 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.
> 
> Thanks,
> 
> Craig
> 
> 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 http://java.sun.com/products/jdo
> 408 276-5638 mailto:Craig.Russell@sun.com P.S. A good JDO? O, Gasp!
> 
> 

Notice:  This email message, together with any attachments, may contain information  of  BEA
Systems,  Inc.,  its subsidiaries  and  affiliated entities,  that may be confidential,  proprietary,
 copyrighted  and/or legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient, and have received
this message in error, please immediately return this by email and then delete it.

Mime
View raw message