title: JPA No Persistence provider for EntityManager
body: <p>I know there are some other questions on this subject, but none of the answers worked.
  I am new to JPA and I am using EclipseLink as implementation and Eclipse as IDE.
  This is my <code>persistence.xml</code> (it is in META-INF folder):</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
  &lt;persistence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
              version="2.0" xmlns="http://java.sun.com/xml/ns/persistence"&gt;
  
      &lt;persistence-unit name="DBService" transaction-type="RESOURCE_LOCAL"&gt;
          &lt;provider&gt;org.eclipse.persistence.jpa.PersistenceProvider&lt;/provider&gt;
  
          &lt;class&gt;com.maze.model.EventModel&lt;/class&gt;
          &lt;class&gt;com.maze.model.StoryModel&lt;/class&gt;
  
          &lt;properties&gt;
              &lt;property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver" /&gt;
              &lt;property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/mazedb;create=true" /&gt;
              &lt;property name="javax.persistence.jdbc.user" value="user" /&gt;
              &lt;property name="javax.persistence.jdbc.password" value="pass" /&gt;
  
              &lt;!-- EclipseLink should create the database schema automatically --&gt;
              &lt;property name="eclipselink.ddl-generation" value="create-tables" /&gt;
              &lt;property name="eclipselink.ddl-generation.output-mode" value="database" /&gt;
          &lt;/properties&gt;
      &lt;/persistence-unit&gt;
  
  &lt;/persistence&gt;
  </code></pre>
  
  <p>and here I am trying to get an EntityManagerFactory</p>
  
  <pre><code>private EntityManagerFactory emf;
  emf = Persistence.createEntityManagerFactory("DBService");
  </code></pre>
  
  <p>At runtime, I get this error:
  <code>javax.persistence.PersistenceException: No Persistence provider for EntityManager named DBService</code></p>
  
  <p>I have followed the steps from tutorials, but no results...</p>
  
  <p><strong>Edit:</strong> I have also added into WEB-INF/lib these jars: <code>eclipselink.jar; javax.persistence_2.0.3.v201010191057.jar; mysql-connector-java-5.1.17-bin.jar</code>, added JPA to the <code>Project Facets</code> but no have seen no results yet...</p>