users@glassfish.java.net

Re: Port 1527 error for JPA application using MySQL/Eclipse/Glassfish

From: <glassfish_at_javadesktop.org>
Date: Wed, 27 Jan 2010 11:44:15 PST

In addition to using the wrong persistence unit name in createEntityManagerFactory, the servlet has:
  @PersistenceUnit
private EntityManagerFactory emf ;

This looks like you are attempting to unject the EMF, which you shouldn't do if using a resource local persistence unit. This annotation could be causing the server to load a default persistence unit for your entity classes, which would have a default datasource. Try removing this annotation, ensuring that you only have the one persistence.xml file and that you are using the correct persistence unit name.


Best Regards,
Chris
[Message sent by forum member 'chris_delahunt' (christopher.delahunt_at_oracle.com)]

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