无法实例化[org.apache.commons.dbcp.BasicDataSource]找不到默认构造函数

时间:2018-09-16 23:22:56

标签: spring dao spring-orm

当我尝试使用HibernateTemplate通过spring-dao将程序与数据库连接时,出现以下错误。

WARNING: Exception encountered during context initialization - cancelling refresh attempt:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ds' defined in class path resource [resource/test.xml]: Instantiation of bean failed; 
nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.commons.dbcp.BasicDataSource]: No default constructor found; 
nested exception is java.lang.NoClassDefFoundError: org/apache/commons/pool/ObjectPool

0 个答案:

没有答案