您的位置:首页 > 编程语言 > Java开发

org.springframework.beans.factory.BeanCreationException:

2011-08-03 15:42 489 查看
错误:

Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userDao': Injection of resource methods
failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateTemplate' defined in class path resource [beans.xml]: Cannot resolve reference to bean 'sf' while setting bean property 'sessionFactory';
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sf' defined in class path resource [beans.xml]: Initialization of bean failed; nested exception is org.springframework.beans.InvalidPropertyException:

原因:

我导入的包有点问题,特别是Spring的包。到这解析不了我的xml文件。唉。找了一天的错误,终于改过来了。

解决方法:

重新导入新的包。

总结:现在在网上下的包,很多都是有问题的。或者组合起来就有问题了。上次下的hibernate3.jar ,居然没有sessionFactory下的一个方法。晕啊。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐