spring 配置c3p0出问题

使用spring配置c3p0出问题,mysql和c3p0的jar包都导入了,没有语法错误,但是出问题了,配置文件为:

<!-- 使用属性文件 -->




异常:警告: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [bean-dataSource.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.mchange.v2.c3p0.ComboPooledDataSource]: No default constructor found; nested exception is java.lang.NoClassDefFoundError: com/mchange/v2/ser/Indirector

看错误信息好像是没有默认的构造方法

是啊!可是这个类不是我自己写的啊!jar包中的类

我也出现了同样的问题,请问楼主解决了没有?

导入c3p0 jar包的同时,还需要导入mchange-commons-java-0.2.3.4.jar 亲测有用