您的位置:首页 > 编程语言 > Java开发

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>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: