Return-Path: Delivered-To: apmail-openjpa-users-archive@minotaur.apache.org Received: (qmail 5758 invoked from network); 4 Mar 2010 21:43:08 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 4 Mar 2010 21:43:08 -0000 Received: (qmail 25271 invoked by uid 500); 4 Mar 2010 21:42:57 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 25245 invoked by uid 500); 4 Mar 2010 21:42:57 -0000 Mailing-List: contact users-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@openjpa.apache.org Delivered-To: mailing list users@openjpa.apache.org Received: (qmail 25236 invoked by uid 99); 4 Mar 2010 21:42:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Mar 2010 21:42:57 +0000 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL,UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [76.13.13.41] (HELO smtp102.prem.mail.ac4.yahoo.com) (76.13.13.41) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 04 Mar 2010 21:42:49 +0000 Received: (qmail 18153 invoked from network); 4 Mar 2010 21:42:27 -0000 Received: from bi01p1.nc.us.ibm.com (dwoods@129.33.49.251 with plain) by smtp102.prem.mail.ac4.yahoo.com with SMTP; 04 Mar 2010 13:42:27 -0800 PST X-Yahoo-SMTP: sCI.ryiswBB7FW.DxjU523c87MI- X-YMail-OSG: TU_N8WYVM1nnm0.Mbq.foe.em34xwAZy13TtcOoUzlLWz3j9lXTgEBkbf89fAMgqmbIl55eoYktqLxbpa669tuZfFMpKdyGX9J4ffVOWx0ZZlEhoutD5IzWeP06QohaE6Qq8pEeckP_lTY7v2o3LcuVcYGMSifWCh3Cgz3lFky3IZTRWMEkgVf5AYW8T1Jm22usg4LziEHDn.i.TvBcZtCTqCgzmsB6TZjkQ5_EK5hYlcNJQevehY9.l_79w68ThwawqylcvG2VPGj0hoZ53TQxFOYEniP4dkwahm2LFZ_Q2vYP_HTc5s1HScC2.EvhumcHbxOg0_ugtwxrC3Zv.Oboq X-Yahoo-Newman-Property: ymail-3 Message-ID: <4B902943.2050303@apache.org> Date: Thu, 04 Mar 2010 16:42:27 -0500 From: Donald Woods User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.8) Gecko/20100227 Lightning/1.0b1 Thunderbird/3.0.3 MIME-Version: 1.0 To: users@openjpa.apache.org Subject: Re: openjpa version version exception during maven build References: <1267699472503-4673512.post@n2.nabble.com> <89c0c52c1003040535n14f44962gb8d042cf1d48e7cf@mail.gmail.com> <1267728284130-4676344.post@n2.nabble.com> <89c0c52c1003041113g6b206900l1e8cf7ae8e51c27e@mail.gmail.com> In-Reply-To: <89c0c52c1003041113g6b206900l1e8cf7ae8e51c27e@mail.gmail.com> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Also, openjpa-2.0.0-M3 used the JPA 2.0 PFD2 spec API level, whereas I'm assuming your Eclipselink is pulling in the final 2.0 APIs. If you upgrade to the openjpa-2.0.0-beta or 2.0.0-beta2 level code, then using the Eclipselink RI API instead of our Geronimo version should work. -Donald On 3/4/10 2:13 PM, Kevin Sutter wrote: > Hi Steve, > No problem on being the newbie. Everybody has to start somewhere... :-) > > It looks like you might actually be mixing EclipseLink and OpenJPA > binaries... In your message below, you are referencing both > org.eclipse.persistence.jpa.PersistenceProvider (eclipselink) and > org.apache.openjpa.persistence.PersistenceProviderImpl (openjpa). So, your > cleaning up of the environment must have gotten rid of the EclipseLink > binaries. > > Thanks for the update, > Kevin > > On Thu, Mar 4, 2010 at 12:44 PM, schong wrote: > >> >> Thanks Kevin - I am the stupid new boy. >> >> I changed the reference and the building is OK now. >> >> I've now got a new problem with my my JUnit test: >> javax.persistence.PersistenceException: Explicit persistence provider >> error(s) occurred for "address-pu" after trying the following discovered >> implementations: org.apache.openjpa.persistence.PersistenceProviderImpl, >> org.eclipse.persistence.jpa.PersistenceProvider from provider: >> org.apache.openjpa.persistence.PersistenceProviderImpl >> >> at >> >> javax.persistence.Persistence.createPersistenceException(Persistence.java:242) >> at >> >> javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:184) >> at >> >> org.firstutility.addressjpa.utility.EntityManagerUtility.getEntityManagerFactory(EntityManagerUtility.java:29) >> at >> >> org.firstutility.addressjpa.utility.EntityManagerUtility.getEntityManager(EntityManagerUtility.java:41) >> at >> >> org.firstutility.test.addressjpa.utility.EntityManagerUtilityTest.testGetEntityManager(EntityManagerUtilityTest.java:35) >> >> Caused by: >> org.apache.openjpa.util.GeneralException: org.xml.sax.SAXException: >> >> file:/home/schong/svn/ProofOfConcept/addressJPA/target/classes/META-INF/persistence.xml >> [Location: Line: 8, C: 134]: org.xml.sax.SAXParseException: >> cvc-complex-type.3.1: Value '1.0' of attribute 'version' of element >> 'persistence' is not valid with respect to the corresponding attribute use. >> Attribute 'version' has a fixed value of '2.0'. >> >> So, I started a completely new project and used the NetBeans Persistent >> Unit >> wizard, choosing EclipseLink(JPA 2 0) as the persistence library. >> It gave me this in the persistence.xml: >> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >> xsi:schemaLocation="http://java.sun.com/xml/ns/persistence >> http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"> >> >> I don't have any dependencies on Open JPA now. >> >> - Everything builds fine and my JUnit tests run fine. >> >> I am guessing that there is some kind of wierd interacction between >> NetBeans >> and the Open JPA I was using. >> >> Steve >> >> >> >> >> >> -- >> View this message in context: >> http://n2.nabble.com/openjpa-version-version-exception-during-maven-build-tp4673512p4676344.html >> Sent from the OpenJPA Users mailing list archive at Nabble.com. >> >