Return-Path: Delivered-To: apmail-incubator-open-jpa-dev-archive@locus.apache.org Received: (qmail 9973 invoked from network); 22 Mar 2007 23:22:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Mar 2007 23:22:35 -0000 Received: (qmail 85891 invoked by uid 500); 22 Mar 2007 23:22:42 -0000 Delivered-To: apmail-incubator-open-jpa-dev-archive@incubator.apache.org Received: (qmail 85870 invoked by uid 500); 22 Mar 2007 23:22:42 -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 85861 invoked by uid 99); 22 Mar 2007 23:22:42 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Mar 2007 16:22:42 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of plinskey@bea.com designates 66.248.192.39 as permitted sender) Received: from [66.248.192.39] (HELO repmmg02.bea.com) (66.248.192.39) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Mar 2007 16:22:34 -0700 Received: from repmmr01.bea.com (repmmr01.bea.com [10.160.29.71]) by repmmg02.bea.com (Switch-3.2.5/Switch-3.2.5) with ESMTP id l2MNMDhG024041 for ; Thu, 22 Mar 2007 16:22:13 -0700 Received: from repbex02.amer.bea.com (repbex02.bea.com [10.160.26.99]) by repmmr01.bea.com (Switch-3.2.5/Switch-3.2.0) with ESMTP id l2MNMDxs020072 for ; Thu, 22 Mar 2007 16:22:13 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: RE: Problem running JPA example from GlassFish page on GF+OpenJPA+Derby Date: Thu, 22 Mar 2007 16:21:20 -0700 Message-ID: <7D856CDFE035FF45A0420ACBD71BDD6303A144DB@repbex02.amer.bea.com> In-Reply-To: <46030876.8000902@sun.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Problem running JPA example from GlassFish page on GF+OpenJPA+Derby Thread-Index: Acds1LV6hr/x1oLZSTKf55LyGHfiLAAA/YHA References: <46030876.8000902@sun.com> From: "Patrick Linskey" To: x-BEA-PMX-Instructions: AV x-BEA-MM: Internal-To-External X-Virus-Checked: Checked by ClamAV on apache.org Did you run the OpenJPA enhancer on your classes before running the test, or, are you running in an environment that should be doing automatic class processing (such as a Java EE application server)? What do you get if you set the 'openjpa.Log' property to 'MetaData=TRACE'? -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: Marina.Vatkina@Sun.COM [mailto:Marina.Vatkina@Sun.COM] > Sent: Thursday, March 22, 2007 3:52 PM > To: open-jpa-dev@incubator.apache.org > Subject: Problem running JPA example from GlassFish page on > GF+OpenJPA+Derby > > Hi, > > I tried to run our simple JPA example that can be found under > (src and all) > https://glassfish.dev.java.net/javaee5/persistence/persistence > -example.html > adding OpenJPA as the provider provider, and 'drop and > create' tables settings > to persistence.xml. > > The test inserts a customer and 2 orders, then runs a JPQL > query to verify the > insert, followed by delete and again verify. > > The same example works correctly on Oracle. I used the > snapshot downloaded > yesterday. > > 1. Derby had been identified correctly: > [#|2007-03-22T14:55:01.920-0700|WARNING|sun-appserver9.1|javax > .enterprise.system.stream.err|_ThreadID=20;_ThreadName=p: > > thread-pool-1; w: > 3;_RequestID=80f667e2-03ab-4ccd-bb17-b8b4d0a88698;|495041 pu1 > INFO [p: thread-pool-1; w: 3] openjpa.jdbc.JDBC - > OpenJPA will now connect > to the database to attempt to determine what type of database > dictionary to use. > To prevent this connection in the future, set your > openjpa.jdbc.DBDictionary > configuration property to the appropriate value for your > database (see the > documentation for available values). > |#] > > [#|2007-03-22T14:55:02.876-0700|WARNING|sun-appserver9.1|javax > .enterprise.system.stream.err|_ThreadID=20;_ThreadName=p: > > thread-pool-1; w: > 3;_RequestID=80f667e2-03ab-4ccd-bb17-b8b4d0a88698;|495997 pu1 > INFO [p: thread-pool-1; w: 3] openjpa.jdbc.JDBC - Using > dictionary class > "org.apache.openjpa.jdbc.sql.DerbyDictionary" (Apache Derby > 10.2.2.0 - (485682) > ,Apache Derby Network Client JDBC Driver 10.2.2.0 - (485682)). > |#] > > 2. verifyInsert failed with: > > Caused by: <4|true|0.9.7-incubating-SNAPSHOT> > org.apache.openjpa.persistence.ArgumentException: Could not > locate metadata for > the class using alias "Customer". Registered alias mappings: > "{Customer=null}" > at > org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDat > aRepository.java:345) > at > org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getClassM > etaData(JPQLExpressionBuilder.java:164) > at > org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.resolveCl > assMetaData(JPQLExpressionBuilder.java:142) > at > org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandid > ateMetaData(JPQLExpressionBuilder.java:211) > at > org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandid > ateMetaData(JPQLExpressionBuilder.java:181) > at > org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandid > ateType(JPQLExpressionBuilder.java:174) > at > org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.access$50 > 0(JPQLExpressionBuilder.java:61) > at > org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder$ParsedJPQ > L.populate(JPQLExpressionBuilder.java:1668) > at > org.apache.openjpa.kernel.jpql.JPQLParser.populate(JPQLParser.java:52) > at > org.apache.openjpa.kernel.ExpressionStoreQuery.populateFromCom > pilation(ExpressionStoreQuery.java:145) > at > org.apache.openjpa.kernel.QueryImpl.newCompilation(QueryImpl.java:644) > at > org.apache.openjpa.kernel.QueryImpl.compilationFromCache(Query > Impl.java:625) > at > org.apache.openjpa.kernel.QueryImpl.compileForCompilation(Quer > yImpl.java:591) > at > org.apache.openjpa.kernel.QueryImpl.compileForExecutor(QueryIm > pl.java:653) > at > org.apache.openjpa.kernel.QueryImpl.getOperation(QueryImpl.java:1475) > at > org.apache.openjpa.kernel.DelegatingQuery.getOperation(Delegat > ingQuery.java:120) > at > org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:214) > at > org.apache.openjpa.persistence.QueryImpl.getSingleResult(Query > Impl.java:282) > at ejb.TestBean.findCustomer(TestBean.java:123) > at ejb.TestBean.verifyInsert(TestBean.java:78) > > thanks, > -marina > > > 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.