JPA整合错误总结

错误1

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory': Failed to introspect bean class [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean] for lookup method metadata: could not find class that it depends on; nested exception is java.lang.NoClassDefFoundError: javax/persistence/ValidationMode

错误分析:

这是hibernate的bug,新版本的 Hibernate跟javaee.jar里面的jpa接口冲突了。

解决方法:

移除Eclipse自带的javaEE包,手动导入jsf-api.jar, jsf-impl.jar, jstl-1.2.jar ,servlet-api.jar

posted @ 2017-12-19 14:33  筱小Q  阅读(309)  评论(0编辑  收藏  举报