title: No Persistence provider for EntityManager named
body: <p>I have my <code>persistence.xml</code> with the same name using <code>TopLink</code> under the <code>META-INF</code> directory.
  Then, I have my code calling it with:</p>
  
  <pre><code>EntityManagerFactory emfdb = Persistence.createEntityManagerFactory("agisdb");
  </code></pre>
  
  <p>Yet, I got the following error message:</p>
  
  <pre>
  2009-07-21 09:22:41,018 [main] ERROR - No Persistence provider for EntityManager named agisdb
  javax.persistence.PersistenceException: No Persistence provider for EntityManager named agisdb
      at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:89)
      at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:60)
  </pre>
  
  <p>Here is the <code>persistence.xml</code>:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0"&gt;
      &lt;persistence-unit name="agisdb"&gt;
          &lt;class&gt;com.agis.livedb.domain.AddressEntity&lt;/class&gt;
          &lt;class&gt;com.agis.livedb.domain.TrafficCameraEntity&lt;/class&gt;
          &lt;class&gt;com.agis.livedb.domain.TrafficPhotoEntity&lt;/class&gt;
          &lt;class&gt;com.agis.livedb.domain.TrafficReportEntity&lt;/class&gt;
          &lt;properties&gt;
              &lt;property name="toplink.jdbc.url" value="jdbc:mysql://localhost:3306/agisdb"/&gt;
              &lt;property name="toplink.jdbc.driver" value="com.mysql.jdbc.Driver"/&gt;
              &lt;property name="toplink.jdbc.user" value="root"/&gt;
              &lt;property name="toplink.jdbc.password" value="password"/&gt;
          &lt;/properties&gt;
      &lt;/persistence-unit&gt;
  &lt;/persistence&gt;
  </code></pre>
  
  <p>It should have been in the classpath. Yet, I got the above error.</p>