I seem to be having yet another problem deploying my application on Glassfish V3 (which deploys fine on V2.1). It would seem that my EJB project cannot find the persistence units defined in my JPA project.
My EAR file looks like this:
[code]
Foo-ear.ear -
lib\
Foo-jpa.jar
Foo-ejb.jar
[/code]
Error: Could not resolve a persistence unit corresponding to the persistence-context-ref-name [com.stuff.Foo/entityManager] in the scope of the module called [Foo-ear#Foo-ejb.jar]. Please verify your application.
In my persistence.xml I have a persistence unit defined:
[code]
<persistence-unit name="Foo-appserv">
[/code]
And in my Foo class I have:
[code]
@PersistenceContext(unitName = "Foo-appserv")
private EntityManager entityManager;
[/code]
Once again this set up deploys fine in Glassfish v2.1 so I have no idea why it doesn't work with V3.
[Message sent by forum member 'cain05' (cain05_at_gmail.com)]
http://forums.java.net/jive/thread.jspa?messageID=379061