Spring中配置Action错误

在做项目时,需要搭建一个SSH 的J2EE程序 出现了一个奇怪错误,而且我的配置文件和jar包都没有问题,在网上找了很多答案但都不能解决问题。
错误:

信息: SessionListener: contextInitialized()
2009-08-25 16:57:14,421 [org.springframework.web.struts.ContextLoaderPlugIn]-[ERROR]
Context initialization failed
org.springframework.beans.factory.BeanCreationException: [color=red]Error creating bean with name 'userBiz' defined in ServletContext resource [/WEB-INF/classes/applicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:[/color]PropertyAccessException 1: org.springframework.beans.TypeMismatchException: Failed to convert property value of type [com.cyy.sp.dao.impl.CyySpUserinfoDAO] to required type [com.cyy.sp.dao.ICyySpUserinfoDAO] for property 'userDao'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [com.cyy.sp.dao.impl.CyySpUserinfoDAO] to required type [com.cyy.sp.dao.ICyySpUserinfoDAO] for property 'userDao': no matching editors or conversion strategy found
Caused by:
org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessException details (1) are:
PropertyAccessException 1:
org.springframework.beans.TypeMismatchException: Failed to convert property value of type [com.cyy.sp.dao.impl.CyySpUserinfoDAO] to required type [com.cyy.sp.dao.ICyySpUserinfoDAO] for property 'userDao'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [com.cyy.sp.dao.impl.CyySpUserinfoDAO] to required type [com.cyy.sp.dao.ICyySpUserinfoDAO] for property 'userDao': no matching editors or conversion strategy found
Caused by:
java.lang.IllegalArgumentException: Cannot convert value of type [com.cyy.sp.dao.impl.CyySpUserinfoDAO] to required type [com.cyy.sp.dao.ICyySpUserinfoDAO] for property 'userDao': no matching editors or conversion strategy found
。。。 。。。

原因是:使用 spring 依赖注入时,实现类没有实现所注入的接口。
当然 缺少jar包和jar包重复以及配置文件有误也会发生这种错误。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值