org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userService' 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.ssh.dao.impl.UserDAO] to required type [com.ssh.dao.IUserDAO] for property 'userDAO'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [com.ssh.dao.impl.UserDAO] to required type [com.ssh.dao.IUserDAO] for property 'userDAO': no matching editors or conversion strategy found 基于MyEclipse的SSH整合 http://blog.csdn.net/JessieLee_YoYo/archive/2009/11/25/4871901.aspx
就是参照他弄了的,最后还是出了一个错误,不知道怎么解决,求各位帮帮忙!

解决方案 »

  1.   

    原因:缺少Spring开头的各种包,到Spring2.0 src中编译新的dist目录出来,拷贝全部的springxxx.jar到jpetstore/WEB-INF/lib下
      

  2.   

    org.springframework.beans.factory.BeanDefinitionStoreException: Line 5 in XML document from ServletContext resource [/WEB-INF/applicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException: Document root element "beans", must match DOCTYPE root "null".   又出错!!
      

  3.   

    是你 userService  这个BEAN方法里面调用的 USERDAO 属性 
    与 application.xml 中配置的不区配。
      

  4.   

    Error creating bean with name 'userService' defined in ServletContext resource Failed to convert property value of type [com.ssh.dao.impl.UserDAO] to required type [com.ssh.dao.IUserDAO] for property 'userDAO';
      

  5.   

    依赖注入问题?
    Failed to convert property value of type [com.ssh.dao.impl.UserDAO] to required type [com.ssh.dao.IUserDAO]
    如果是接口,看看实现类实现的是否是对应的接口
      

  6.   

    首先看一下你的spring的application。xml里面应该有一个
    <bean id="UserDAO" class="XXX.UserDAOImpl">
    </bean>
    看一下XXX.UserDAOImpl是不是写的正确能对应到具体的实现类上面其次是否创建了
    Interface:UserDAO
    和实现类:UserDAOImpl楼主的问题是spring在bean初始化的时候不能根据配置文件找到对应的bean,所以出现以上问题只要关心你的spring配置文件就可以了
      

  7.   

    找不到Bean的实力 你看下SPring配置文件 里面你注入没