org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFacto
2014-11-25 09:35
756 查看
配置Spring+Hibernate时,碰到一个问题:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in file
....
上网搜了很多资料,各种各样的方法都试过没有用。
最后在beans.xml文件中加入了
原因在于:在我的bean的映射文件Person.hbm.xml中我加了句:
<cache usage="read-write" region="cn.itcast.bean.Person"/>
这句是配置二级缓存文件的。我的这个问题另一个解决方法就是删除这句即可。
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in file
....
上网搜了很多资料,各种各样的方法都试过没有用。
最后在beans.xml文件中加入了
hibernate.cache.use_second_level_cache=true hibernate.cache.use_query_cache=false hibernate.cache.provider_class=org.hibernate.cache.EhCacheProvider解决了。
原因在于:在我的bean的映射文件Person.hbm.xml中我加了句:
<cache usage="read-write" region="cn.itcast.bean.Person"/>
这句是配置二级缓存文件的。我的这个问题另一个解决方法就是删除这句即可。
相关文章推荐
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFacto
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFacto
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFacto
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'selectcommoninfo' defined in ServletCont
- ssh2 整合 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in Servl
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContex
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name '***'
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'powerAction'
- 解决org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.spring
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContex
- 关于org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFac
- nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#1': Can
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'infoContentA
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'lanagerServi
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springfr
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'baseDAOFacto
- Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'o
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.mybatis.
- org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name'se
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name '[beanName]'