问题描述
- ssh框架web,自动生成hbm.xml和实体类
- ssh框架web,数据库由MySQL变oracle,myeclipse自动生成hbm.xml和实体类,Injection of resource dependencies failed。
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'BHZControl': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bhzdataService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'baseDAO': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void com.xyu.dao.impl.BaseDAOImpl.setSessionFactory(org.hibernate.SessionFactory); nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.hibernate.cfg.annotations.reflection.XMLContext$Default.getDelimitedIdentifier()Ljava/lang
解决方案
sessionFactory,,是不是你的dataSource配的有问题
解决方案二:
我也感觉是配置文件里的sessionFactory出错了,你好好看一下你的配置文件
解决方案三:
hibernate3和hibernate4版本兼容性问题
时间: 2024-11-03 04:56:53