注册 登录
编程论坛 J2EE论坛

搭建SSH框架时出现错误

z68752553 发布于 2010-07-30 09:40, 700 次点击

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testService' defined in ServletContext resource [/WEB-
INF/applicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type [com.test.impl.dao.Test2DAO] to required type [com.test.dao.ItestDao] for property 'testDao'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [com.test.impl.dao.Test2DAO] to required type [com.test.dao.ItestDao] for property 'testDao': no matching editors or conversion strategy found


这是什么问题呢,怎么结局?各位高手麻烦给个答案
3 回复
#2
2010-07-30 22:56
applicationContext.xml文件有错,或是你的web.xml文件里面有写错误
   还有的时候是你的架包会有冲突
#3
hsh_19872010-07-31 08:45
把这个文件applicationContext.xml放到/WEB-INF目录下就OK
#4
baifenghan2010-08-01 00:10
java.lang.IllegalArgumentException: Cannot convert value of type [com.test.impl.dao.Test2DAO] to required type [com.test.dao.ItestDao] for property 'testDao'

似乎还是找到IOC的配置文件了,只是配置中类型与你要获得的bean的类型不匹配。检查一下。
1