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>
相关文章推荐
- java责任链模式1
- Spring Security(18)——Jsp标签
- Spring Security(17)——基于方法的权限控制
- 'hibernateTemplate' must be of type [org.springframework.orm.hibernate5.HibernateTemplate]
- Spring Security(16)——基于表达式的权限控制
- 69 个经典 Spring 面试题和答案
- Java 合并word
- Spring Security(15)——权限鉴定结构
- 《Spring学习笔记》:Spring、Hibernate、struts2的整合(以例子来慢慢讲解,篇幅较长)
- Spring Security(14)——权限鉴定基础
- 基于Spring可扩展Schema提供自定义配置支持(spring配置文件中 配置标签支持)
- Spring Security(13)——session管理
- Spring4 Web开发新特性
- Spring Security(12)——Remember-Me功能
- 字符串相关的算法整理
- 【Zookeeper系列三】ZooKeeper Java API使用
- 【50】java 匿名内部类剖析
- Spring Security(11)——匿名认证
- 反射工厂模式
- 【50】java 匿名内部类剖析