我試圖以編程方式創建實體廠長沒有持久性文件,編程創建實體管理器,而不持久性文件,
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