title: create entity manager programmatically without persistence file
body: <p>I'm trying to create entity Factory manager programmatically without persistence file</p>
  
  <pre><code>    EntityManagerFactory emf;
      Map&lt;String, String&gt; properties = new HashMap&lt;String, String&gt;();
      properties.put("hibernate.connection.driver_class", "com.mysql.jdbc.Driver");
      properties.put("hibernate.connection.url", "jdbc:mysql://173.194.25***************");
      properties.put("hibernate.connection.username", "etech****");
      properties.put("hibernate.connection.password", "A*****");
      properties.put("hibernate.dialect", "org.hibernate.dialect.MySQLDialect");
      properties.put("hibernate.show-sql", "true");
      properties.put("provider", "org.hibernate.ejb.HibernatePersistence");
      emf = Persistence.createEntityManagerFactory(idClient, properties);
  </code></pre>
  
  <p>On line</p>
  
  <pre><code>emf = Persistence.createEntityManagerFactory(idClient, properties);
  </code></pre>
  
  <p>I am getting the error:</p>
  
  <blockquote>
    <p>org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com****RepositoryFieldsFieldWorkerRepositoryImpl': Invocation of init method failed; nested exception is javax.persistence.PersistenceException: No Persistence provider for EntityManager named idClient</p>
  </blockquote>
  
  <p>How can i resolve this problem ? </p>
  
  <p>any help will be appreciated</p>