tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: missing required persistence.xml (apache-tomee-tomcat-7.0.6-3.2-SNAPSHOT)
Date Wed, 22 Jun 2011 04:47:45 GMT
Hi, can you provide a demo app?

- Romain

Le 22 juin 2011 02:40, "afryer" <apfryer@hotmail.com> a écrit :
> I just did an svn update on the trunk and rebuilt tomee to make sure i had
> the latest changes. I'm still getting this problem. The error i'm seeing
> in openejb.log is....
>
> 2011-06-22 10:22:00,042 - ERROR - FAIL ... TournamentImpl: Missing
required
> persistence.xml for @PersistenceContext ref "entityManager" to unit
> "poker-entities"
>
> This looks to me like openejb is trying to create the Stateless session
ejb
> TournamentImpl but is failing because it can't inject the entityManager
> because it doesn't exist.
>
> I have structured my webapp such that my entity beans are contained in a
jar
> file (poker-entities.jar) and my stateless session ejbs are contained in
> another jar file (poker-ejbs.jar), both jars contained in the WEB-INF/lib
> folder of my web application (war file). In my poker-entities.jar file i
> have a persistence.xml file in the META-INF folder. It seems like openejb
> is not finding this persistence.xml in my jar file anymore or its finding
> the ejb jar first and trying to instantiate it before it got to the entity
> jar file. I say "anymore" because it used to work with an earlier version
> of openejb that i built from the trunk ages ago (around December or
> January). I tried renaming my jar files so the entity jar file would be
> first when ordered by name but it didn't make any difference.
>
> To work around this problem, i have to put a persistence.xml file in the
> META-INF folder of the web application war file and use the <jar-file>
> element in that persistence.xml to specify the
> WEB-INF/lib/poker-entities.jar. This works ok but is not ideal. I would
> like to be able to go back to having openejb automatically find the
> poker-entities.jar file in WEB-INF/lib and create the entity manager that
> way.
>
>
>
>
>
>
> --
> View this message in context:
http://openejb.979440.n4.nabble.com/missing-required-persistence-xml-apache-tomee-tomcat-7-0-6-3-2-SNAPSHOT-tp3329814p3615730.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message