org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cnstockFunctionUserDAO' defined in class path resource [applicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'org.springframework.orm.hibernate4.HibernateTransactionManager' to required type 'org.hibernate.SessionFactory' for property 'sessionFactory'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [org.springframework.orm.hibernate4.HibernateTransactionManager] to required type [org.hibernate.SessionFactory] for property 'sessionFactory': no matching editors or conversion strategy found
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
http://bbs.csdn.net/topics/390591322?page=1#post-395571846我的错跟这个不太一样人家要SessionFactory呢你给配置的是org.springframework.orm.hibernate4.HibernateTransactionManager?Causedby:java.lang.IllegalStateException:Cannotconvertvalueoftype[org.springframework.orm.hibernate4.HibernateTransactionManager]torequiredtype[org.hibernate.SessionFactory]forproperty'sessionFactory':nomatchingeditorsorconversionstrategyfound
atorg.springframework.beans.TypeConverterDelegate.convertIfNecessary(TypeConverterDelegate.java:241)
atorg.springframework.beans.BeanWrapperImpl.convertIfNecessary(BeanWrapperImpl.java:470)
...17more
hibernate4和hibernate3的配置文件有变更,详细百度.
Exceptioninthread"main"org.hibernate.HibernateException:NoSessionfoundforcurrentthread版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。