title: Failed to determine Hibernate PersistenceProvider
body: <p>I am trying to configure LocalContainerEntityManagerFactoryBean without persisten.xml file.</p>
  
  <p>this is my dataSource - it works for Hibernate SessionFactory - so, it is ok.</p>
  
  <pre><code>&lt;bean id="dataSource"
      class="org.apache.commons.dbcp2.BasicDataSource" destroy-method="close"&gt;
      &lt;property name="driverClassName" value="com.mysql.jdbc.Driver"/&gt;
      &lt;property name="url" value="jdbc:mysql://localhost:3306/test"/&gt;
      &lt;property name="username" value="root"/&gt;
      &lt;property name="password" value="root"/&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>this is my LocalContainerEntityManagerFactoryBean</p>
  
  <pre><code>   &lt;bean id="myEmf" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"&gt;
     &lt;property name="dataSource" ref="dataSource" /&gt;
     &lt;property name="packagesToScan" value="application.models" /&gt;
     &lt;property name="jpaVendorAdapter"&gt;
        &lt;bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter" /&gt;
     &lt;/property&gt;
     &lt;property name="jpaProperties"&gt;
        &lt;props&gt;
           &lt;prop key="hibernate.hbm2ddl.auto"&gt;create-drop&lt;/prop&gt;
           &lt;prop key="hibernate.dialect"&gt;org.hibernate.dialect.MySQLDialect&lt;/prop&gt;
        &lt;/props&gt;
     &lt;/property&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>An exception that i am getting:</p>
  
  <pre><code>...Could not instantiate bean class [org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter]: Constructor threw exception; nested exception is java.lang.IllegalStateException: Failed to determine Hibernate PersistenceProvider
  </code></pre>
  
  <p>I read documentation, and i know that LocalContainerEntityManagerFactoryBean has such property, and similar style of creating LocalContainerEntityManagerFactoryBean works in Spring in Action 3 and here: <a href="http://softwarecave.org/2014/03/15/using-jpa-and-jta-with-spring/">http://softwarecave.org/2014/03/15/using-jpa-and-jta-with-spring/</a></p>
  
  <p>Maybe You have an idea what i am doing wrong or at least what spring want tell me via this exception ?</p>
  
  <p>Thanks in advance,
  Cheers :)</p>
  
  <p>P.S to be clear, Failed to determine Hibernate PersistenceProvider doesn't mean that spring expect persistence.xml - this should be error like:  No persistence units parsed from {classpath*:META-INF/persistence.xml}</p>
  
  <p>RESOLVED:</p>
  
  <p>thanks  JB Nizet - if You will have similar problem add:</p>
  
  <pre><code>    &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-entitymanager&lt;/artifactId&gt;
          &lt;version&gt;4.3.6.Final&lt;/version&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>to pom.xml</p>