JPA与Spring2.5整合时发生不能创建entityManagerFactory的问题解决方法
2010-12-31 17:37
851 查看
今天在做jpa与spring整合时,发现个异常... 如下
异常内容: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [beans.xml]:: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: No PersistenceProvider specified in EntityManagerFactory configuration, and chosen PersistenceUnitInfo does not specify a provider class name either
解决方法: 在persisitence.xml文件中添加 <provider>org.hibernate.ejb.HibernatePersistence</provider>
异常内容: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [beans.xml]:: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: No PersistenceProvider specified in EntityManagerFactory configuration, and chosen PersistenceUnitInfo does not specify a provider class name either
解决方法: 在persisitence.xml文件中添加 <provider>org.hibernate.ejb.HibernatePersistence</provider>
相关文章推荐
- 在Spring环境中建立JPA Spring JPA 提供了三种方法创建JPA EntityManagerFactory:
- Spring三种方法创建JPA EntityManagerFactory的方法
- 解决集成jpa时无法创建entityManagerFactory的问题
- JPA+Spring下,applicationContext.xml中的entityManagerFactory中的class设置问题
- JPA+Spring下,applicationContext.xml中的entityManagerFactory中的class设置问题
- Spring2.5,Activemq5.2整合遇到的问题以及解决方法
- 解决iis版本问题,不能在VS2003中创建asp.net应用程序的方法
- Hibernate3.x,hibernate3.x,Hibernate3.x整合Spring3.x不能实现自动创建表结构的解决办法:
- springmvc ResponseEntity 下载文件损坏问题解决方法
- struts+spring+hibernate整合问题解决方法
- Spring + toplink-essentials(JPA) is not a known entity type 问题解决
- 解决Spring中AOP不能切入Struts的DispatchAction方法的问题
- ActionBarSherlock SlidingMenu整合,解决SlidingMenu example的getSupportActionBar()方法不能用问题
- 在对话框中动态创建的菜单不能响应UpdeateCommand的问题解决方法
- 使用JPA的EntityManager.persist()方法无法保存到数据库的问题
- spring+springmvc整合mabytis时mapper注入失败问题解决方法
- 整合jpa和Spring报错问题的解决
- struts+spring+hibernate整合问题解决方法 陆续更新中....
- spring2.5与jpa整合时遇到的问题
- Spring2.5整合Activiti 5.11 解决MalformedParameterizedTypeException问题