我试图以编程方式创建实体厂长没有持久性文件,编程创建实体管理器,而不持久性文件,
EntityManagerFactory emf;
Map<String, String> properties = new HashMap<String, String>();
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);
在线
emf = Persistence.createEntityManagerFactory(idClient, properties);
我收到错误:
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
我该如何解决这个问题?
任何帮助将不胜感激
视觉变化?这是什么意思 ? – tamtoum1987 2015-04-03 15:24:11
其实这个评论是打算在框中,我告诉你我编辑时提出了什么改变... – rfornal 2015-04-03 15:37:11