title: No persistence provider found with JBoss AS 7
body: <p>I've just migrated from Tomcat to JBoss AS 7.
  So, I configured Mysql datasource in JBoss (adding module.xml with associated Jar, adding driver bloc into standalone.xml and configuring datasource through JBoss interface.</p>
  
  <p>No errors when deploying but impossible to get an entityManager (JPA with Hibernate in background).</p>
  
  <p>Indeed, when this code is executed: </p>
  
  <pre><code>Persistence.createEntityManagerFactory("RoomManagement");
  </code></pre>
  
  <p>I obtain this error : </p>
  
  <blockquote>
    <p>javax.persistence.PersistenceException: No Persistence provider for
    EntityManager named RoomManagement
      javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:69)
      javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:47)</p>
  </blockquote>
  
  <p>Very strange because I well verified that my persistence.xml does take place into War at WEB-INF/classes/META-INF directory.</p>
  
  <p>My persistence.xml looks like as follow :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;persistence xmlns="http://java.sun.com/xml/ns/persistence" version="2.0"&gt;
  
      &lt;persistence-unit name="RoomManagement" transaction-type="JTA"&gt;
          &lt;provider&gt;org.hibernate.ejb.HibernatePersistence&lt;/provider&gt;
          &lt;jta-data-source&gt;java:jboss/datasources/MySqlDS&lt;/jta-data-source&gt;
          &lt;class&gt;com.parisdescartes.roommanagement.domain.entities.Address&lt;/class&gt;
          &lt;class&gt;com.parisdescartes.roommanagement.domain.entities.Building&lt;/class&gt;
          &lt;class&gt;com.parisdescartes.roommanagement.domain.entities.Civility&lt;/class&gt;
          &lt;class&gt;com.parisdescartes.roommanagement.domain.entities.EventType&lt;/class&gt;
          &lt;class&gt;com.parisdescartes.roommanagement.domain.entities.Job&lt;/class&gt;
          &lt;class&gt;com.parisdescartes.roommanagement.domain.entities.Reservation&lt;/class&gt;
          &lt;class&gt;com.parisdescartes.roommanagement.domain.entities.Room&lt;/class&gt;
          &lt;class&gt;com.parisdescartes.roommanagement.domain.entities.RoomType&lt;/class&gt;
          &lt;class&gt;com.parisdescartes.roommanagement.domain.entities.Tool&lt;/class&gt;
          &lt;class&gt;com.parisdescartes.roommanagement.domain.entities.User&lt;/class&gt;
          &lt;class&gt;com.parisdescartes.roommanagement.domain.entities.UserDetail&lt;/class&gt;
          &lt;class&gt;com.parisdescartes.roommanagement.domain.entities.Schedule&lt;/class&gt;
          &lt;properties&gt;
              &lt;property name="hibernate.connection.autocommit" value="true" /&gt;
              &lt;property name="hibernate.archive.autodetection" value="class"/&gt;
              &lt;property name="hibernate.show_sql" value="true"/&gt;
              &lt;property name="hibernate.format_sql" value="true"/&gt;
              &lt;property name="hbm2ddl.auto" value="update"/&gt;
              &lt;property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect" /&gt;
          &lt;/properties&gt;
      &lt;/persistence-unit&gt;
  &lt;/persistence&gt; 
  </code></pre>
  
  <p>Did I make a mistake or forgot to specify something ?</p>