This issue matches a problem I'm experiencing.
Same setup: EAR containing EJBs & WARs, Entities in ear's lib dir.
Deploys just fine via Glassfishv3 admin console (unexploded EAR).
Fails to deploy via Eclipse tooling (glassfish plugin), which explodes the EAR & contents. I get (root) exception:
Caused by: java.lang.IllegalStateException: Unable to retrieve EntityManagerFactory for unitName MYPUNAME
[Message sent by forum member 'rsitze' (rsitze_at_us.ibm.com)]
http://forums.java.net/jive/thread.jspa?messageID=389167