Return-Path: Delivered-To: apmail-incubator-open-jpa-dev-archive@locus.apache.org Received: (qmail 87563 invoked from network); 19 Apr 2007 14:38:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Apr 2007 14:38:00 -0000 Received: (qmail 12542 invoked by uid 500); 19 Apr 2007 14:38:06 -0000 Delivered-To: apmail-incubator-open-jpa-dev-archive@incubator.apache.org Received: (qmail 12522 invoked by uid 500); 19 Apr 2007 14:38:06 -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 12507 invoked by uid 99); 19 Apr 2007 14:38:06 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Apr 2007 07:38:06 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [68.142.225.206] (HELO smtp108.rog.mail.re2.yahoo.com) (68.142.225.206) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 19 Apr 2007 07:37:59 -0700 Received: (qmail 50096 invoked from network); 19 Apr 2007 14:37:37 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=rogers.com; h=Received:X-YMail-OSG:From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:X-Mailer:X-MimeOLE:In-Reply-To:Thread-Index; b=26QXDffrcylyOwxE7XkwstKX3ruc3zrYd/Eaxle+8xpil3KDAwPP2Ag2bkVTue9AwHGjxYcnD1L5BqprqbU0okjq5sfSEszIyb23Ss7QU6JvhJezqngQ4QlBRAYkTZaZCndH6jIeAGho4hiekvOYSFRkiinelNEg16djQTpEu/s= ; Received: from unknown (HELO tyan2400) (pjmoran@rogers.com@74.103.60.187 with login) by smtp108.rog.mail.re2.yahoo.com with SMTP; 19 Apr 2007 14:37:37 -0000 X-YMail-OSG: J4YVTuAVM1ls6Xchvhko_B7o_YJ0ozvvND9XCi3kgxoL39tyN7ahNO8ZuxR0a9unCw-- From: "Phill Moran" To: , Subject: RE: Named query created in error Date: Thu, 19 Apr 2007 10:37:36 -0400 Message-ID: <032601c78290$46943cd0$6601a8c0@tyan2400> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 In-Reply-To: <1b5bfeb50704190714s1f3d0aa2n60c6abb18a3f70c8@mail.gmail.com> Thread-Index: AceCjSSitoVp5GUjQQS4amjYmxr9IgAAldQg X-Virus-Checked: Checked by ClamAV on apache.org Thanks Jacek, Store is annotated with @Entity: @Entity @Table(name = "manufacturer", schema = "bidspec") @Inheritance(strategy = InheritanceType.TABLE_PER_CLASS) @NamedQueries( { @NamedQuery(name = "StoreFXPK", query = "SELECT s FROM Store s WHERE s.id = :primaryKey"), @NamedQuery(name = "StoreFXTypeAndName", query = "SELECT s FROM Store s WHERE s.type = :type AND UPPER(s.name) = :storeName OR UPPER(s.displayName) = :storeName"), @NamedQuery(name = "StoreFXName", query = "SELECT s FROM Store s WHERE UPPER(s.name) = :storeName OR UPPER(s.displayName) = :storeName") }) public class Store extends Persistable { .... I thought I needed to add the class names to persistence.xml to have them post-processed. I recognized (since using java agent right now) they are all looked at for persistence candidacy but figured this would be needed for compile time processing that I would switch to later. Let me know if I am way off here. Also must I list all other classes in the section or can I simply list add after my listed classes. - Clearly I am uncertain to the full purpose of this file Thanks for all this support Phill -----Original Message----- From: eljotpl@gmail.com [mailto:eljotpl@gmail.com] On Behalf Of Jacek Laskowski Sent: April 19, 2007 10:15 AM To: open-jpa-dev@incubator.apache.org Subject: Re: Named query created in error On 4/19/07, Phill Moran wrote: > I am using MySQL version 5 > The stack trace only shows because have wrapped this in a try/catch. > The exception becomes NPE due to OpenJPA trying to make a Person > object form more than just Person Object data, it fails to do this > (silently) and the object it was to be assigned to become an NP Could you make sure that the entity behind p.store is really an entity? Is it annotated with @Entity? > Nothing in the persistence.xml except class names (all persistable > classes represented in here) and OpenJPA settings. > Interesting questions on why the duplicate query exception suddenly > showing up, It's because you use and no in persistence.xml. You should either remove the elements or add and the Ignoring. warning message should go away. Jacek -- Jacek Laskowski http://www.JacekLaskowski.pl