tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Karsten.O...@t-systems.com>
Subject WG: OpenEJB - Missing required persistence.xml
Date Tue, 12 Feb 2008 16:21:54 GMT
Hi,

I have attached a stripped down sample project, where the same error occurs: At first it fails
because the persistence.xml is not found, later it is found. Also attached is the persistence.xml.

The output of jar -tf :

META-INF/
META-INF/MANIFEST.MF
foo/
foo/bar/
foo/bar/testfacade/
foo/bar/testfacade/model/
foo/bar/testfacade/model/Punkt.class
foo/bar/testfacade/model/Strecke.class
foo/bar/testfacade/TestFacade.class
foo/bar/testfacade/TestFacadeImpl.class
foo/bar/testfacade/TestFacadeImplOpenEJBTest.class
META-INF/persistence.xml
META-INF/maven/
META-INF/maven/TestFacade/
META-INF/maven/TestFacade/TestFacade/
META-INF/maven/TestFacade/TestFacade/pom.xml
META-INF/maven/TestFacade/TestFacade/pom.properties 
META-INF/maven/org.apache.openejb/openejb-javaagent/pom.properties

Unfortunately I cannot send the whole project, the mail server is misconfigured and rejects
it as spam.

The openejb.xml

<openejb>

	<Deployments dir="src/test/resources"/>
	<Deployments dir="target/classes" />

<Connector id="Default JDBC Database"  type="DataSource">
		#Embedded Derby example
		JdbcDriver org.apache.derby.jdbc.EmbeddedDriver
		JdbcUrl jdbc:derby:derbyDB;create=true</Connector>

</openejb>


Regards,
Karsten

-----Urspr√ľngliche Nachricht-----
Von: eljotpl@gmail.com [mailto:eljotpl@gmail.com] Im Auftrag von Jacek Laskowski
Gesendet: Montag, 11. Februar 2008 22:24
An: users@openejb.apache.org
Betreff: Re: OpenEJB - Missing required persistence.xml

On Feb 11, 2008 10:34 AM,  <Karsten.Ohme@t-systems.com> wrote:

> - FAIL ... PatternManagementDaoImpl:    Missing required persistence.xml
> for @PersistenceContext ref "em" to unit "pattern-managementPu"
>
> What's wrong? It is there. And where should it be placed? In META-INF
> like usually? It seems that it is later found.

"like usually"? That's how EJB3 spec mandates it so we should follow
the rule and we do. Can you jar -tf <your ejb/ear> and send the output
here? Could you show persistence.xml too so we can look at it?

> Can I define the order in which the EJB modules are loaded?

Not in a spec-compliant way. I'm not sure if you can do it in openejb
either, but would rather wait for Dave/Dain's reply before counting on
mine.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl

Mime
View raw message