Thanks Romain.

That would explain it.



On 8 Nov 2017 7:07 pm, "Romain Manni-Bucau" <rmannibu...@gmail.com> wrote:

> Hi
>
> WEB-INF is handled by the EE side of the server, the standalone API
> (Persistence) requires to use META-INF from the classpath
>
> Romain Manni-Bucau
> @rmannibucau |  Blog | Old Blog | Github | LinkedIn
>
>
> 2017-11-08 17:51 GMT+01:00 Paul Carter-Brown <paul.carter-brown@smilecoms.
> com>:
> > Hi,
> >
> > I have a war packaged in an ear.
> >
> > In the war I have a persistence,xml in WEB-INF/ as TomEE requires it in
> > this location at boot in order to bootstrap the persistence providers.
> >
> > This works fine.
> >
> > Now my issue: if I try and
> > use javax.persistence.Persistence.createEntityManagerFactory("
> my_pu_name")
> > then I get an exception:
> >
> > Caused by: javax.persistence.PersistenceException: No persistence
> providers
> > available for "my_pu_name" after trying the following discovered
> > implementations: org.apache.openjpa.persistence.PersistenceProviderImpl,
> > org.eclipse.persistence.jpa.PersistenceProvider
> >
> >
> > I have managed to resolve this by copying my persistence.xml into
> META-INF
> > as well as WEB-INF
> >
> > Should that be necessary as it seems like a bit of a hack to me?
> >
> > I'm using PLUME 7.0.4
> >
> > Paul
> >
> > --
> >
> >
> > This email is subject to the disclaimer of Smile Communications at
> http://www.smilecoms.com/home/email-disclaimer/ <http://www.smilecoms.com/
> disclaimer>
> >
>

Reply via email to