ListBull
2017-05-18 10:41
采纳率: 100%
浏览 1.1k
已采纳

ssm+maven报错,高手帮帮忙

严重: 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 'dataSource' defined in ServletContext resource [/WEB-INF/spring/spring-mybatis.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'driver' of bean class [com.mchange.v2.c3p0.ComboPooledDataSource]: Bean property 'driver' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
Related cause: org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.alibaba.druid.support.spring.stat.DruidStatInterceptor] for bean with name 'druid-stat-interceptor' defined in ServletContext resource [/WEB-INF/spring/spring-mybatis.xml]; nested exception is java.lang.ClassNotFoundException: com.alibaba.druid.support.spring.stat.DruidStatInterceptor

  • 写回答
  • 好问题 提建议
  • 关注问题
  • 收藏
  • 邀请回答

5条回答 默认 最新

  • 丹顶鹤是码农 2017-05-18 11:54
    已采纳

    据我所知,ComboPooledDataSource这个类里面没有driver属性,只有driverClass属性,所以你的数据库配置文件错了!应该是这样才对

    已采纳该答案
    评论
    解决 无用
    打赏 举报
  • ListBull 2017-05-18 10:38

    Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'driver' of bean class [com.mchange.v2.c3p0.ComboPooledDataSource]: Bean property 'driver' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?

    评论
    解决 无用
    打赏 举报
  • ListBull 2017-05-18 10:44

    这是怎么回事?刚开始学maven,不知道怎么改,说是创建数据库连接池的bean出错,求高手帮帮忙

    评论
    解决 无用
    打赏 举报
  • ListBull 2017-05-18 10:47

    maven test 和maven install没问题,部署tomcat报错

    评论
    解决 无用
    打赏 举报
  • boymzq 2017-05-18 11:19

    spring-mybatis.xml 文件中数据源配错了

    评论
    解决 无用
    打赏 举报

相关推荐 更多相似问题