Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #32566

I can not successfully call Persistence.createEntityManagerFactory

Path csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail
From Cecil Westerhof <Cecil@decebal.nl>
Newsgroups comp.lang.java.programmer
Subject I can not successfully call Persistence.createEntityManagerFactory
Date Wed, 09 Sep 2015 15:23:13 +0200
Organization Decebal Computing
Lines 28
Message-ID <87egi7u3pa.fsf@Equus.decebal.nl> (permalink)
Mime-Version 1.0
Content-Type text/plain
Injection-Info mx02.eternal-september.org; posting-host="528adfd6ad074c92fdc6a7f8fb9e23d8"; logging-data="19790"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19WaJrhRFWDfAWjhI3NjTqsHI4I9LgJDFw="
User-Agent Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)
X-Homepage http://www.decebal.nl/
Cancel-Lock sha1:o6GOReMlTIeBLkq27opzTcrhtBI= sha1:81nEbFXSe9yupkBkWguO02qAVbo=
Xref csiph.com comp.lang.java.programmer:32566

Show key headers only | View raw


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:
    <openjpa-2.1.2-SNAPSHOT-r422266:1530146 nonfatal general error> org.
    at org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource
    (XMLMetaDataParser.java:424)

So I am doing something wrong. Does anyone have an idea what it could
be that I am doing wrong?

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. :'-(

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

Back to comp.lang.java.programmer | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

I can not successfully call Persistence.createEntityManagerFactory Cecil Westerhof <Cecil@decebal.nl> - 2015-09-09 15:23 +0200
  Re: I can not successfully call Persistence.createEntityManagerFactory Cecil Westerhof <Cecil@decebal.nl> - 2015-09-11 18:39 +0200
    Re: I can not successfully call Persistence.createEntityManagerFactory Arne Vajhøj <arne@vajhoej.dk> - 2015-09-11 21:36 -0400

csiph-web