Return-Path: Delivered-To: apmail-incubator-open-jpa-dev-archive@locus.apache.org Received: (qmail 15882 invoked from network); 24 Apr 2007 16:21:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Apr 2007 16:21:41 -0000 Received: (qmail 58795 invoked by uid 500); 24 Apr 2007 16:21:48 -0000 Delivered-To: apmail-incubator-open-jpa-dev-archive@incubator.apache.org Received: (qmail 58769 invoked by uid 500); 24 Apr 2007 16:21:47 -0000 Mailing-List: contact open-jpa-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: open-jpa-dev@incubator.apache.org Delivered-To: mailing list open-jpa-dev@incubator.apache.org Received: (qmail 58760 invoked by uid 99); 24 Apr 2007 16:21:47 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Apr 2007 09:21:47 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [192.18.42.249] (HELO nwk-ea-fw-1.sun.com) (192.18.42.249) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Apr 2007 09:21:39 -0700 Received: from d1-sfbay-09.sun.com ([192.18.39.119]) by nwk-ea-fw-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l3OGLI4h009600 for ; Tue, 24 Apr 2007 09:21:18 -0700 (PDT) Received: from conversion-daemon.d1-sfbay-09.sun.com by d1-sfbay-09.sun.com (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) id <0JH000I01G13VN00@d1-sfbay-09.sun.com> (original mail from Marina.Vatkina@Sun.COM) for open-jpa-dev@incubator.apache.org; Tue, 24 Apr 2007 09:21:18 -0700 (PDT) Received: from sun.com ([129.150.18.79]) by d1-sfbay-09.sun.com (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPSA id <0JH00004ZG3GNG50@d1-sfbay-09.sun.com> for open-jpa-dev@incubator.apache.org; Tue, 24 Apr 2007 09:21:16 -0700 (PDT) Date: Tue, 24 Apr 2007 09:21:16 -0700 From: Marina Vatkina Subject: Re: Open JPA error-Could not locate metadata for the class using alias In-reply-to: <10155865.post@talk.nabble.com> Sender: Marina.Vatkina@Sun.COM To: open-jpa-dev@incubator.apache.org Message-id: <462E2E7C.7090107@sun.com> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=us-ascii Content-transfer-encoding: 7BIT X-Accept-Language: en-us, en References: <625027.94080.qm@web8510.mail.in.yahoo.com> <10095774.post@talk.nabble.com> <1b5bfeb50704200452y29780d0epf3eb7cbc0cb4c574@mail.gmail.com> <10100315.post@talk.nabble.com> <10101376.post@talk.nabble.com> <4628F3E9.3070302@sun.com> <10106645.post@talk.nabble.com> <46291CE1.4070507@Sun.COM> <10110227.post@talk.nabble.com> <4629410E.9060607@Sun.COM> <10155865.post@talk.nabble.com> User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.4) Gecko/20040414 X-Virus-Checked: Checked by ClamAV on apache.org 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. > >