title: java.lang.ClassNotFoundException org.hibernate.engine.jdbc.connections.spi.MultiTenantConnectionProvider
body: <p>Good morning, I 'm trying to implement a multi-tenancy Java project ( Primefaces , EJBs , Hibernate 5 / JPA - Postgres ).</p>
  
  <p><strong>pom.xml</strong></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;5.0.7.Final&lt;/version&gt;
         &lt;scope&gt;provided&lt;/scope&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p><strong>persistence.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;persistence&gt;
  &lt;persistence-unit name="myDS" transaction-type="JTA"&gt;
  
      &lt;jta-data-source&gt;java:/myDS&lt;/jta-data-source&gt;
  
      &lt;class&gt;com.arkin.erpmodel.general.entities.AccountingDocumentType&lt;/class&gt;
      &lt;class&gt;com.arkin.erpmodel.general.entities.AccountingOperation&lt;/class&gt;
      &lt;class&gt;com.arkin.erpmodel.general.entities.AccountingYear&lt;/class&gt;
      &lt;class&gt;com.arkin.erpmodel.general.entities.AccountingYearPeriod&lt;/class&gt;    
  
      &lt;properties&gt;
              &lt;property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/&gt;
              &lt;property name="hibernate.multiTenancy" value="SCHEMA"/&gt;
              &lt;property name="hibernate.tenant_identifier_resolver" value="com.arkin.erpmodel.multitenancyprovider.SchemaResolver"/&gt;
              &lt;property name="hibernate.multi_tenant_connection_provider" value="com.arkin.erpmodel.multitenancyprovider.MultiTenantProvider"/&gt;
              &lt;property name="hibernate.show_sql" value="true" /&gt;
              &lt;property name="hibernate.format_sql" value="true" /&gt;
              &lt;property name="org.hibernate.type" value="debug" /&gt;
              &lt;property name="hibernate.cache.use_second_level_cache" value="true" /&gt;
              &lt;property name="hibernate.cache.use_query_cache" value="true" /&gt;
              &lt;property name="hibernate.cache.infinispan.statistics" value="false" /&gt;
              &lt;property name="hibernate.order_inserts" value="true"/&gt;
              &lt;property name="hibernate.jdbc.batch_size" value="20"/&gt;
              &lt;!-- Turn on entity and query cache statistics in the admin console --&gt;
              &lt;property name="hibernate.generate_statistics" value="false" /&gt;
              &lt;!-- store entries in the cache in a more human friendly format - helps when interpreting logs --&gt;
              &lt;property name="hibernate.cache.use_structured_entries" value="false" /&gt;
              &lt;!-- MultiTenancy --&gt;           
      &lt;/properties&gt;    
    &lt;/persistence-unit&gt;
  &lt;/persistence&gt;
  </code></pre>
  
  <p><a href="http://i.stack.imgur.com/EAbxL.jpg" rel="nofollow">Maven Dependencies</a></p>
  
  <p>I could help know why not recognize the MultiTenantConnectionProvider class?</p>