users@glassfish.java.net

Re: Having trouble deplying EAR. Can't resolve persistence unit...

From: <glassfish_at_javadesktop.org>
Date: Sun, 18 Apr 2010 06:29:45 PDT

I figured this out. I had my persistence.xml file in the POJO module with my entities. I had to move it into my EJB module and add a reference to the .jar file containing my entities. I must have overlooked that step when updating to v3.

[code]
        <persistence-unit name="ItmaPU">
                <jta-data-source>itma-ds</jta-data-source>

                <jar-file>lib/itma-domain-0.4-SNAPSHOT.jar</jar-file>
                <exclude-unlisted-classes>false</exclude-unlisted-classes>

                <properties>
                        <property name="eclipselink.ddl-generation" value="drop-and-create-tables"/>
                        <property name="eclipselink.target-database" value="PostgreSQL"/>
                </properties>
        </persistence-unit>
[/code]
[Message sent by forum member 'jptech']

http://forums.java.net/jive/thread.jspa?messageID=397641