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 <dr.steve.ch...@gmail.com> 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: <openjpa-2.0.0-beta-r422266:903062M nonfatal general error> >> 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: >> <persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" >> 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. >> >