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

java.lang.NoClassDefFoundError: org/hibernate/engine/SessionFactoryImplementor

2016-05-26 16:20 519 查看

java.lang.NoClassDefFoundError: org/hibernate/engine/SessionFactoryImplementor

详细错误提示如下:

Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘userDao’ defined in file [E:\Workspaces\MyEclipse Professional 2014\Spring_Register_Hibernate_Struts_0000_Final\WebRoot\WEB-INF\classes\com\register\dao\impl\UserDaoImpl.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘txAdvice’: Cannot resolve reference to bean ‘transactionManager’ while setting bean property ‘transactionManager’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘transactionManager’ defined in class path resource [beans.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/hibernate/engine/SessionFactoryImplementor

解决方法:来至于http://www.cnblogs.com/Mr-Clint/p/3580287.html

<bean id="transactionManager" class="org.springframework.orm.hibernate5.HibernateTransactionManager" >
<property name="dataSource" ref="dataSource" />  <!-- 添加这一行 --!>
<property name="sessionFactory" ref="sessionFactory"></property>
</bean>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: