问答详情
源自:5-2 配置去掉Hibernate的配置文件-Spring整合Hibernate

老师您好,这个问题是什么原因啊?

Error creating bean with name 'dataSource' defined in class path resource [applicationContext.xml]: Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'dirverClass' of bean class [com.mchange.v2.c3p0.ComboPooledDataSource]: Bean property 'dirverClass' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?

提问者:赵亚群群 2016-08-16 07:57

个回答

  • wangjunjia
    2016-08-20 20:32:38
    已采纳

    bean 的dataSource 的dirverClass 属性,你检查一下有没有写对(配置),

  • 白骆驼
    2017-09-21 00:19:22

    换jar包吧,我就是这么解决的!

  • 2016-10-03 18:30:52

    hi 怎么解决的呢

    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 class path resource [applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/springframework/core/annotation/AnnotatedElementUtils
     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:529)

  • 大咪
    2016-09-09 15:07:21

    并不是。。。你这个肯定是前面代码的问题,因为我就是代码写错了然后抱的错误和你一样。。,我的代码错误是在创建service对象的时候大小写定义的有问题,所以报了这个错。。。。

  • qq_广为人知_0
    2016-09-01 16:29:07

    我也遇到这个问题了