ITeye博客

JPA与Spring2.5整合时发生不能创建entityManagerFactory的问题解决方法

caoxiping · 2010-06-21 20:05 · 我遇到过的问题 · 企业架构 · Markdown

今天在做jpa与spring整合时,发现个异常... 如下

异常内容: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource :: 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文件中添加 org.hibernate.ejb.HibernatePersistence

次要解决方法:在你的spring配置文件中: Container去掉试试,GOOK LUCK!

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。