1 Reply Latest reply on Mar 5, 2006 4:18 PM by Jérémy Goldschmidt

    presistence.xml with j2se

    Thibault Cuvillier Newbie


      I run a j2se application with jax.persistence, but I cannot get the EntityManagerFactory declared in the persistence.xml file.

      My code:
      factory = Persistence.createEntityManagerFactory("em");

      I get: No Persistence provider for EntityManager named em

      The persistence.xml file is located in src/META-INF/persistence.xml

      The application is compiled in the classes directory, with the META-INF/persistence.xml copied.

      The application is not packaed in a jar.

      Shoudl works ?