首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Web开发 >

小初学者求指导·这个有关问题如何解决额

2012-10-18 
小菜鸟求指导这个问题怎么解决额Exception sending context initialized event to listener instance of c

小菜鸟求指导·这个问题怎么解决额
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 'districtService' defined in file [F:\Program Files\apache-tomcat-6.0.18\webapps\pengyun\WEB-INF\classes\applicationContext-service.xml]: Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type [com.pengyun.dao.impl.SceneryDaoImpl] to required type [com.pengyun.dao.DistrictDao] for property 'districtDao'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [com.pengyun.dao.impl.SceneryDaoImpl] to required type [com.pengyun.dao.DistrictDao] for property 'districtDao': no matching editors or conversion strategy found
Caused by: org.springframework.beans.TypeMismatchException: Failed to convert property value of type [com.pengyun.dao.impl.SceneryDaoImpl] to required type [com.pengyun.dao.DistrictDao] for property 'districtDao'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [com.pengyun.dao.impl.SceneryDaoImpl] to required type [com.pengyun.dao.DistrictDao] for property 'districtDao': no matching editors or conversion strategy found
Caused by: java.lang.IllegalArgumentException: Cannot convert value of type [com.pengyun.dao.impl.SceneryDaoImpl] to required type [com.pengyun.dao.DistrictDao] for property 'districtDao': no matching editors or conversion strategy found
2012-10-12 16:23:27 org.apache.catalina.core.StandardContext start
严重: Error listenerStart
2012-10-12 16:23:27 org.apache.catalina.core.StandardContext start



在这里我吗、并没有要实现DistrictDao的想法,也根本不用实现它,可是错误出在这里,是很纠结的啊

[解决办法]
org.springframework.beans.TypeMismatchException: 
Failed to convert property value of type [com.pengyun.dao.impl.SceneryDaoImpl] 
to required type [com.pengyun.dao.DistrictDao] for property 'districtDao';

问楼主:
'districtService' 是怎么注入DAO的?
[解决办法]
districtService 缺少 'districtDao'; set and get method 


[解决办法]
districtService 缺少 'districtDao'; set and get method 同時檢查下 districtDao在配置文件裏面是否有定義
[解决办法]

探讨

districtService 缺少 'districtDao'; set and get method 同時檢查下 districtDao在配置文件裏面是否有定義

热点排行