title: java.lang.ClassNotFoundException: javax.persistence.Persistence cannot be found with JPA
body: <p>I'm praticing with JPA API. I got an error </p>
  
  <pre><code>java.lang.ClassNotFoundException: javax.persistence.Persistence cannot be found
  </code></pre>
  
  <p>My code below:</p>
  
  <pre><code>EntityManagerFactory emf;
  emf = Persistence.createEntityManagerFactory("mail");
  EntityManager em = emf.createEntityManager();
  Query query = em.createQuery("SELECT v FROM Version v");
  List&lt;Version&gt; versions = query.getResultList();
  </code></pre>
  
  <p>The error at line <code>emf = Persistence.createEntityManagerFactory("mail");</code></p>
  
  <p>Any solution?</p>