Path: csiph.com!news.mixmin.net!aioe.org!.POSTED!not-for-mail From: =?UTF-8?Q?Arne_Vajh=c3=b8j?= Newsgroups: comp.lang.java.programmer Subject: Re: I can not successfully call Persistence.createEntityManagerFactory Date: Fri, 11 Sep 2015 21:36:32 -0400 Organization: Aioe.org NNTP Server Lines: 31 Message-ID: References: <87egi7u3pa.fsf@Equus.decebal.nl> <87613gucz4.fsf@Equus.decebal.nl> NNTP-Posting-Host: NIM2IeSPVd0kE3mU1mieXw.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com comp.lang.java.programmer:32580 On 9/11/2015 12:39 PM, Cecil Westerhof wrote: > On Wednesday 9 Sep 2015 15:23 CEST, Cecil Westerhof wrote: >> I have to implement some JPA functionalities. It is fairly new to >> me, so it is no wonder that things go wrong. >> >> I am trying to call: emf = >> Persistence.createEntityManagerFactory("this-persistence-unit"); >> >> In my persistence.xml the name of persistence-unit is >> 'this-persistence-unit'. >> >> But the call gives: javax.persistence.PersistenceException: Explicit >> persistence provider error(s) occurred for "this-persistence-unit" >> after trying the >> com.ibm.websphere.persistence.PersistenceProviderImpl returned: >> org. >> at org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource >> (XMLMetaDataParser.java:424) >> I am using the same persistence.xml as is used in another project. >> But they do not have any idea how persistence is implemented, so >> they cannot help me. :'-( > > It turned out there files where not correct: I needed to change quite > a few things. Why they do not get errors is a mystery for me. JPA may use a different persistence.xml than what they think. Arne