严重: 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 'sessionFactory' 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 [java.lang.String] to required type [javax.sql.DataSource] for property 'dataSource'; sessionFactory中的dataSource属性配置不对. 
应该是javax.sql.DataSource类型, 现在是string类型. 

解决方案 »

  1.   

    Caused by: java.lang.IllegalArgumentException: Cannot convert value of type [java.lang.String] to required type [javax.sql.DataSource] for property 'dataSource': no matching editors or conversion strategy found 不能将java.lang.String转换成需要的javax.sql.DataSource参数,没有匹配的转换器'dataSource'需要的是javax.sql.DataSource参数你spring中参数配置有问题
      

  2.   

    Failed to convert property value of type [java.lang.String] to required type 类型转换错误检查一下相关转换
      

  3.   

    把你的applicationContext.xml和hibernate.cfg.xml两个配置文件贴出来看看啊。