本文主要是介绍java.lang.NoClassDefFoundError: org/hibernate/engine/SessionFactoryImplementor,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
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>
这篇关于java.lang.NoClassDefFoundError: org/hibernate/engine/SessionFactoryImplementor的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!